app
components
data
functions
api
admin-apps
appeals
auth
data-transfers
events-team
game-appeals
game-bans
gme
inactivity
infractions
me
items
_middleware.ts
appeals.ts
reports.ts
mod-queue
reports
uploads
[[path]].ts
events.ts
webview-captcha.ts
_middleware.ts
common.ts
email.ts
gcloud.ts
permissions.ts
roblox-open-cloud.ts
public
.gitignore
.node-version
.prettierignore
OFL.txt
README.md
emotion-server.js
index.css
index.d.ts
package-lock.json
package.json
remix.config.js
server.ts
theme.ts
tsconfig.json
14 lines
434 B
TypeScript
14 lines
434 B
TypeScript
import { jsonError, jsonResponse } from "../../common.js";
|
|
|
|
export async function onRequestGet(context: RequestContext) {
|
|
const { results, success } = await context.env.D1.prepare(
|
|
"SELECT approved, created_at, id, open FROM appeals WHERE user = ?;",
|
|
)
|
|
.bind(context.data.current_user.id)
|
|
.all();
|
|
|
|
if (!success) return jsonError("Unable to retrieve appeals", 500);
|
|
|
|
return jsonResponse(JSON.stringify(results));
|
|
}
|