release: PicHost v1.0.0
Publish Docker image / build-and-push (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s

Multi-user image hosting with RBAC, upload preferences, and admin settings.
This commit is contained in:
O96u committed 2026-08-22 14:36:57 +08:00
commit bc4cba7e52
115 files changed
+26508

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { getCurrentUser } from '../../utils/auth'
import { createApiError } from '../../utils/api-error'
export default defineEventHandler(async (event) => {
const user = await getCurrentUser(event)
if (!user) {
createApiError(event, 'UNAUTHORIZED', '未登录', 401)
}
return {
authenticated: true,
user: { id: user.id, username: user.username, role: user.role }
}
})