sinka/api/src/tenancy/public-tenant.ts
armando cf16bf1fb6 Show integration health in the admin and keep clients on their own screen.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 03:43:18 -03:00

17 lines
412 B
TypeScript

import { NotFoundException } from '@nestjs/common';
export type PublicTenant = {
name: string;
slug: string;
status: string;
};
export function publicTenantView(
tenant: { name: string; slug: string; status: string } | null,
): PublicTenant {
if (!tenant) {
throw new NotFoundException('Este cliente não existe.');
}
return { name: tenant.name, slug: tenant.slug, status: tenant.status };
}