Compare commits
No commits in common. "probablycorey-patch-8" and "main" have entirely different histories.
probablyco
...
main
15
code.ts
15
code.ts
|
|
@ -17,14 +17,13 @@ const server = serve({
|
||||||
routes: {
|
routes: {
|
||||||
"/": {
|
"/": {
|
||||||
GET: () => new Response("🌵"),
|
GET: () => new Response("🌵"),
|
||||||
VRERE: () => new Response("Use /gitea/webhook for POST requests", { status: 400 }),
|
POST: () => new Response("Use /gitea/webhook for POST requests", { status: 400 }),
|
||||||
},
|
},
|
||||||
"/wtf/delete-the-db": {
|
"/wtf/delete-the-db": {
|
||||||
GET: () => {
|
GET: () => {
|
||||||
const dbPath = getConfig("dbPath")
|
const dbPath = getConfig("dbPath")
|
||||||
Bun.file(dbPath).delete()
|
Bun.file(dbPath).delete()
|
||||||
|
|
||||||
AJSDLKJLAKSJD
|
|
||||||
return new Response(`DB is no more`)
|
return new Response(`DB is no more`)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -53,7 +52,17 @@ AJSDLKJLAKSJD
|
||||||
},
|
},
|
||||||
"/errors": {
|
"/errors": {
|
||||||
GET: () => {
|
GET: () => {
|
||||||
return new Respo
|
return new Response(JSON.stringify(errors, null, 2), {
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"/discord/auth": async () => {
|
||||||
|
const permissions = 536870912 // from https://discord.com/developers/applications
|
||||||
|
const authorizeUrl = `https://discord.com/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT_ID}&scope=bot&permissions=${permissions}`
|
||||||
|
|
||||||
|
const html = (
|
||||||
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<h1>Authenticate spike</h1>
|
<h1>Authenticate spike</h1>
|
||||||
<a href={authorizeUrl}>Authorize</a>
|
<a href={authorizeUrl}>Authorize</a>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user