Skip to content

Commit 68dcc1c

Browse files
committed
adjusts in create instance
1 parent f7dcab3 commit 68dcc1c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/api/controllers/instance.controller.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ export class InstanceController {
687687

688688
if (env.KEY !== key) {
689689
const instanceByKey = await this.repository.auth.findByKey(key);
690-
console.log('instanceByKey', instanceByKey);
691690
if (instanceByKey) {
692691
name = instanceByKey._id;
693692
arrayReturn = true;

src/api/guards/auth.guard.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ async function apikey(req: Request, _: Response, next: NextFunction) {
7979
return next();
8080
}
8181
} else {
82-
const instanceByKey = await repository.auth.findByKey(key);
83-
if (instanceByKey) {
84-
return next();
82+
if (req.originalUrl.includes('/instance/fetchInstances')) {
83+
const instanceByKey = await repository.auth.findByKey(key);
84+
if (instanceByKey) {
85+
return next();
86+
}
8587
}
8688
}
8789
} catch (error) {

0 commit comments

Comments
 (0)