[F] Fix return
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ export const Fmt = {
|
|||||||
export const Backend = {
|
export const Backend = {
|
||||||
get: (id: string) => fetch(`${cfg.backend}/${id}`).then(r => {
|
get: (id: string) => fetch(`${cfg.backend}/${id}`).then(r => {
|
||||||
if (!r.ok) throw new Error(`Failed to get puzzle: ${r.status}`)
|
if (!r.ok) throw new Error(`Failed to get puzzle: ${r.status}`)
|
||||||
r.text()
|
return r.text()
|
||||||
}).then(JsonTy.parse),
|
}).then(JsonTy.parse),
|
||||||
post: (data: Checkpoint) => fetch(`${cfg.backend}/`, { method: "post", body: JsonTy.stringify(data) }),
|
post: (data: Checkpoint) => fetch(`${cfg.backend}/`, { method: "post", body: JsonTy.stringify(data) }),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user