Refactored classes according to new convention

This commit is contained in:
giancarlo
2024-04-23 00:10:12 +08:00
parent 70da6ef1fa
commit 17e0781581
30 changed files with 351 additions and 131 deletions

View File

@@ -12,11 +12,26 @@ const Schema = z.object({
userId: z.string().uuid(),
});
export class LeaveTeamAccountService {
export function createLeaveTeamAccountService(
client: SupabaseClient<Database>,
) {
return new LeaveTeamAccountService(client);
}
/**
* @name LeaveTeamAccountService
* @description Service for leaving a team account.
*/
class LeaveTeamAccountService {
private readonly namespace = 'leave-team-account';
constructor(private readonly adminClient: SupabaseClient<Database>) {}
/**
* @name leaveTeamAccount
* @description Leave a team account
* @param params
*/
async leaveTeamAccount(params: z.infer<typeof Schema>) {
const logger = await getLogger();