cuappdev / cuappdev/resell-backend
Create @Authorized decorator
Open
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
- Separate what `@CurrentUser` and `@Authorized` does
- `@CurrentUser` returns a `UserModel` if it exists, `undefined` otherwise
- `@Authorized` does nothing if user is authorized, returns an Unauthorized exception otherwise
- `@Authorized` follows this: https://github.com/typestack/routing-controllers#authorized-decorator
- Potentially make an `@OptionalAuthorized` middleware as well
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.