feat: Organization services

This commit is contained in:
sauravdhakal12
2026-02-22 15:47:45 +05:45
parent f4c9174752
commit afed1731d2
42 changed files with 862 additions and 17 deletions

View File

@@ -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() {