mirror of
https://github.com/linsa-io/linsa.git
synced 2026-05-30 02:20:42 +02:00
feat: feedback (#156)
* minimal tiptap * wip * img edit block * wip * fix
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { currentUser } from "@clerk/nextjs/server"
|
||||
import { createServerActionProcedure, ZSAError } from "zsa"
|
||||
|
||||
export const authedProcedure = createServerActionProcedure()
|
||||
.handler(async () => {
|
||||
try {
|
||||
const clerkUser = await currentUser()
|
||||
return { clerkUser }
|
||||
} catch {
|
||||
throw new ZSAError("NOT_AUTHORIZED", "User not authenticated")
|
||||
}
|
||||
})
|
||||
.createServerAction()
|
||||
Reference in New Issue
Block a user