commit
4047a7ec23
378 changed files with 29334 additions and 0 deletions
12
pages/api/auth/verify.js
Normal file
12
pages/api/auth/verify.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { useAuth } from 'lib/middleware';
|
||||
import { ok, unauthorized } from 'lib/response';
|
||||
|
||||
export default async (req, res) => {
|
||||
await useAuth(req, res);
|
||||
|
||||
if (req.auth) {
|
||||
return ok(res, req.auth);
|
||||
}
|
||||
|
||||
return unauthorized(res);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue