mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-02-18 01:27:15 +00:00
fix(api): set content type for json (#441)
This commit is contained in:
parent
cfe9225be1
commit
720c372be0
@ -250,7 +250,7 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return RestApiResponse.response($json)
|
return RestApiResponse.response($json, contentType="application/json")
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
@ -264,7 +264,7 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
|||||||
return RestApiResponse.error(Http500, err.msg)
|
return RestApiResponse.error(Http500, err.msg)
|
||||||
|
|
||||||
let json = %unused
|
let json = %unused
|
||||||
return RestApiResponse.response($json)
|
return RestApiResponse.response($json, contentType="application/json")
|
||||||
|
|
||||||
router.rawApi(
|
router.rawApi(
|
||||||
MethodPost,
|
MethodPost,
|
||||||
@ -293,7 +293,7 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
|||||||
return RestApiResponse.error(Http500, err.msg)
|
return RestApiResponse.error(Http500, err.msg)
|
||||||
|
|
||||||
let json = %availability
|
let json = %availability
|
||||||
return RestApiResponse.response($json)
|
return RestApiResponse.response($json, contentType="application/json")
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
@ -311,7 +311,7 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
|||||||
|
|
||||||
let json = %purchase
|
let json = %purchase
|
||||||
|
|
||||||
return RestApiResponse.response($json)
|
return RestApiResponse.response($json, contentType="application/json")
|
||||||
|
|
||||||
|
|
||||||
return router
|
return router
|
||||||
|
Loading…
x
Reference in New Issue
Block a user