Download apps/backend-mock/api/user/info.ts from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 305 Bytes
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/apps/backend-mock/api/user/info.ts
- Command line
-
hf download hf://spaces/binhugg3/admin/apps/backend-mock/api/user/info.ts
-
curl -L -o info.ts https://huggingface.co/spaces/binhugg3/admin/resolve/main/apps/backend-mock/api/user/info.ts
305 Bytes
| import { verifyAccessToken } from '~/utils/jwt-utils'; | |
| import { unAuthorizedResponse } from '~/utils/response'; | |
| export default eventHandler((event) => { | |
| const userinfo = verifyAccessToken(event); | |
| if (!userinfo) { | |
| return unAuthorizedResponse(event); | |
| } | |
| return useResponseSuccess(userinfo); | |
| }); | |