feat: Organization services
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Injectable, UnauthorizedException } from '@nestjs/common';
|
||||
import { AsyncLocalStorage } from 'async_hooks';
|
||||
import { RequestContext } from './request-context.type';
|
||||
|
||||
@@ -31,7 +31,9 @@ export class RequestContextService {
|
||||
|
||||
// Helpers
|
||||
get user() {
|
||||
return this.get().user;
|
||||
const user = this.get().user;
|
||||
if (!user) throw new UnauthorizedException();
|
||||
return user;
|
||||
}
|
||||
|
||||
get tx() {
|
||||
|
||||
Reference in New Issue
Block a user