Preprod (#177)
This commit is contained in:
commit
9c6eac97fe
@ -58,7 +58,7 @@
|
|||||||
"file-type-checker": "^1.0.8",
|
"file-type-checker": "^1.0.8",
|
||||||
"fp-ts": "^2.16.1",
|
"fp-ts": "^2.16.1",
|
||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.106",
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.108",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"monocle-ts": "^2.3.13",
|
"monocle-ts": "^2.3.13",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
|
@ -52,6 +52,11 @@ export default class UserController extends ApiController {
|
|||||||
//Hydrate user to be able to use his contact
|
//Hydrate user to be able to use his contact
|
||||||
const userHydrated = User.hydrate<User>(prismaUser, { strategy: "excludeAll" });
|
const userHydrated = User.hydrate<User>(prismaUser, { strategy: "excludeAll" });
|
||||||
|
|
||||||
|
if(!userHydrated.contact?.email || userHydrated.contact?.email === "") {
|
||||||
|
this.httpUnauthorized(response, "Email not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Check if user is whitelisted
|
//Check if user is whitelisted
|
||||||
const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
||||||
|
|
||||||
|
@ -184,11 +184,6 @@ export default class OfficeFoldersController extends ApiController {
|
|||||||
//validate folder
|
//validate folder
|
||||||
await validateOrReject(officefolderToUpdate, { groups: ["updateFolder"], forbidUnknownValues: false });
|
await validateOrReject(officefolderToUpdate, { groups: ["updateFolder"], forbidUnknownValues: false });
|
||||||
|
|
||||||
if ((officeFolderFound as any).folder_anchor?.status !== "VERIFIED_ON_CHAIN") {
|
|
||||||
this.httpBadRequest(response, "Cannot archive a not anchored folder");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//call service to get prisma entity
|
//call service to get prisma entity
|
||||||
const officeFolderEntityUpdated = await this.officeFoldersService.updateStatus(uid, officefolderToUpdate);
|
const officeFolderEntityUpdated = await this.officeFoldersService.updateStatus(uid, officefolderToUpdate);
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ export default class DocumentTypesRepository extends BaseRepository {
|
|||||||
* @description : Find many document types
|
* @description : Find many document types
|
||||||
*/
|
*/
|
||||||
public async findMany(query: Prisma.DocumentTypesFindManyArgs) {
|
public async findMany(query: Prisma.DocumentTypesFindManyArgs) {
|
||||||
query.take = Math.min(query.take || this.defaultFetchRows, this.maxFetchRows);
|
|
||||||
return this.model.findMany(query);
|
return this.model.findMany(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +121,8 @@ export default class IdNotService extends BaseService {
|
|||||||
code: code,
|
code: code,
|
||||||
grant_type: "authorization_code",
|
grant_type: "authorization_code",
|
||||||
});
|
});
|
||||||
|
console.log(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query.toString());
|
||||||
|
|
||||||
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
||||||
if(token.status !== 200) console.error(await token.text());
|
if(token.status !== 200) console.error(await token.text());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user