ディレクトリ再編
This commit is contained in:
parent
cb924ff92b
commit
85d471efbb
45 changed files with 204 additions and 41 deletions
14
src/backend/controllers/session.ts
Normal file
14
src/backend/controllers/session.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* トークンを必要とするセッションAPI
|
||||
* @author Xeltica
|
||||
*/
|
||||
|
||||
import { CurrentUser, Get, JsonController } from 'routing-controllers';
|
||||
import { User } from '../models/entities/user';
|
||||
|
||||
@JsonController('/session')
|
||||
export class SessionController {
|
||||
@Get() get(@CurrentUser({ required: true }) user: User) {
|
||||
return user;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue