mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
refactor(nestjs): hook up auth endpoints
This commit is contained in:
@@ -2,6 +2,7 @@ import { TenancyContext } from '@/modules/Tenancy/TenancyContext.service';
|
||||
import { throwIfTenantNotExists } from '../Organization/_utils';
|
||||
import { TenantModel } from '@/modules/System/models/TenantModel';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ModelObject } from 'objection';
|
||||
|
||||
@Injectable()
|
||||
export class GetCurrentOrganizationService {
|
||||
@@ -12,7 +13,7 @@ export class GetCurrentOrganizationService {
|
||||
* @param {number} tenantId
|
||||
* @returns {Promise<ITenant[]>}
|
||||
*/
|
||||
async getCurrentOrganization(): Promise<TenantModel> {
|
||||
async getCurrentOrganization(): Promise<ModelObject<TenantModel>> {
|
||||
const tenant = await this.tenancyContext
|
||||
.getTenant()
|
||||
.withGraphFetched('subscriptions')
|
||||
|
||||
Reference in New Issue
Block a user