File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 7
7
(define (the-formatter-map s)
8
8
(case s
9
9
[("define-operators " ) (standard-formatter-map "begin " )]
10
+ [("define-api-endpoint " ) (standard-formatter-map "define " )]
10
11
[else #f ]))
Original file line number Diff line number Diff line change 378
378
(header #"Access-Control-Allow-Origin " (string->bytes/utf-8 "* " )))
379
379
(curry write-json (hash-ref job-result 'timeline )))]))
380
380
381
- (define-syntax-rule (define-api-endpoint (name post-data) body ... )
381
+ (define-syntax-rule (define-api-endpoint (name post-data)
382
+ body ... )
382
383
(begin
383
384
(define (function post-data)
384
385
body ... )
449
450
#:timeline-disabled? #t ))
450
451
451
452
(define-api-endpoint ("cost " post-data)
452
- (start-job 'cost (get-test post-data) #:seed #f #:pcontext #f #:profile? #f #:timeline-disabled? #f ))
453
+ (start-job 'cost
454
+ (get-test post-data)
455
+ #:seed #f
456
+ #:pcontext #f
457
+ #:profile? #f
458
+ #:timeline-disabled? #f ))
453
459
454
460
(define ->mathjs-endpoint
455
461
(post-with-json-response (lambda (post-data)
Original file line number Diff line number Diff line change 95
95
(match-define (list pt ex) entry)
96
96
(unless (and (list? pt) (= (length pt) (length var-reprs)))
97
97
(error 'json->pcontext "Invalid point ~a " pt))
98
- (values (map json->value pt var-reprs)
99
- (json->value ex output-repr))))
98
+ (values (map json->value pt var-reprs) (json->value ex output-repr))))
100
99
(mk-pcontext pts exs))
101
100
102
101
(define (pcontext->json pcontext repr)
You can’t perform that action at this time.
0 commit comments