Rename ref parameter to next_location

This commit is contained in:
Cadence Ember 2022-12-04 23:44:35 +13:00
parent a661ddb313
commit ba3b39242c
Signed by untrusted user: cadence
GPG key ID: BC1C2C61CF521B17
2 changed files with 3 additions and 3 deletions

View file

@ -91,5 +91,5 @@
#:max-age (* 60 60 24 365 10)))))
(define (user-cookies-setter-url req new-settings)
(format "/set-user-settings?~a" (params->query `(("ref" . ,(url->string (request-uri req)))
(format "/set-user-settings?~a" (params->query `(("next_location" . ,(url->string (request-uri req)))
("new_settings" . ,(format "~a" new-settings))))))

View file

@ -12,7 +12,7 @@
(define (page-set-user-settings req)
(response-handler
(define ref (dict-ref (url-query (request-uri req)) 'ref))
(define next-location (dict-ref (url-query (request-uri req)) 'next_location))
(define new-settings (read (open-input-string (dict-ref (url-query (request-uri req)) 'new_settings))))
(define headers (user-cookies-setter new-settings))
(generate-redirect ref #:headers headers)))
(generate-redirect next-location #:headers headers)))