app
components
data
functions
api
_middleware.ts
common.ts
email.ts
gcloud.ts
permissions.ts
roblox-open-cloud.ts
public
.gitignore
.node-version
.prettierignore
OFL.txt
emotion-server.js
index.css
index.d.ts
package-lock.json
package.json
remix.config.js
server.ts
theme.ts
tsconfig.json
13 lines
293 B
TypeScript
13 lines
293 B
TypeScript
export function jsonError(error: string, status: number) {
|
|
return jsonResponse(JSON.stringify({ error }), status);
|
|
}
|
|
|
|
export function jsonResponse(body: string, status = 200) {
|
|
return new Response(body, {
|
|
headers: {
|
|
"content-type": "application/json",
|
|
},
|
|
status,
|
|
});
|
|
}
|