feat: Move ACL responsability to each Application Controller

This commit is contained in:
Josepablo C
2024-08-06 12:57:07 -06:00
parent 6b4c475a38
commit f8d41db04d
5 changed files with 26 additions and 12 deletions

View File

@@ -6,17 +6,17 @@ const { Account, User, Company, getUserById, getCompanyById, findUsersPage, find
// Queries
//////////////////////////////////////////////
async function account( args, context ) {
const account = new Account( context.graphQLContext.userId );
const account = new Account( context.requestContext.userId );
return account;
}
async function profile( args, context ) {
const profile = new User( context.graphQLContext.userId );
const profile = new User( context.requestContext.userId );
return profile;
}
async function company( args, context ) {
const company = new Company( context.graphQLContext.companyId );
const company = new Company( context.requestContext.companyId );
return company;
}