Skip to content

Commit

Permalink
Run lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Feb 9, 2024
1 parent fdbf59c commit 5878a22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions backend/src/ee/routes/v1/org-role-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const registerOrgRoleRouter = async (server: FastifyZodProvider) => {
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
const role = await server.services.orgRole.createRole(
req.permission.id,
req.params.organizationId,
req.permission.id,
req.params.organizationId,
req.body,
req.permission.orgId
);
Expand Down Expand Up @@ -115,8 +115,8 @@ export const registerOrgRoleRouter = async (server: FastifyZodProvider) => {
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
const roles = await server.services.orgRole.listRoles(
req.permission.id,
req.params.organizationId,
req.permission.id,
req.params.organizationId,
req.permission.orgId
);
return { data: { roles } };
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/auth/auth-fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const validateProviderAuthToken = (providerToken: string, email: string)

if (decodedToken.authTokenType !== AuthTokenType.PROVIDER_TOKEN) throw new UnauthorizedError();
if (decodedToken.email !== email) throw new Error("Invalid auth credentials");

if (decodedToken.organizationId) {
return { orgId: decodedToken.organizationId };
}
Expand Down
4 changes: 2 additions & 2 deletions backend/src/services/org/org-dal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
TUserEncryptionKeys
} from "@app/db/schemas";
import { DatabaseError } from "@app/lib/errors";
import { buildFindFilter, selectAllTableCols, TFindFilter, TFindOpt, withTransaction, ormify } from "@app/lib/knex";
import { buildFindFilter, ormify, selectAllTableCols, TFindFilter, TFindOpt, withTransaction } from "@app/lib/knex";

export type TOrgDALFactory = ReturnType<typeof orgDALFactory>;

export const orgDALFactory = (db: TDbClient) => {
const orgOrm = ormify(db, TableName.Organization);

const findOrgById = async (orgId: string) => {
try {
const org = await db(TableName.Organization).where({ id: orgId }).first();
Expand Down

0 comments on commit 5878a22

Please sign in to comment.