Skip to content

Commit 855bcc5

Browse files
committed
feat(identities): DELETE endpoint unlinks the identity
1 parent 2d1527e commit 855bcc5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineEventHandler } from "h3"
2+
import { unlinkGithubIdentity } from "../../../../lib/github-identities"
3+
import { requireSession } from "../../../../lib/permissions"
4+
5+
export default defineEventHandler(async (event) => {
6+
const session = await requireSession(event)
7+
await unlinkGithubIdentity(session.userId)
8+
return { ok: true }
9+
})

0 commit comments

Comments
 (0)