mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-09-06 22:33:39 -06:00
adjusts in create instance
This commit is contained in:
parent
f7dcab3736
commit
68dcc1c86a
@ -687,7 +687,6 @@ export class InstanceController {
|
|||||||
|
|
||||||
if (env.KEY !== key) {
|
if (env.KEY !== key) {
|
||||||
const instanceByKey = await this.repository.auth.findByKey(key);
|
const instanceByKey = await this.repository.auth.findByKey(key);
|
||||||
console.log('instanceByKey', instanceByKey);
|
|
||||||
if (instanceByKey) {
|
if (instanceByKey) {
|
||||||
name = instanceByKey._id;
|
name = instanceByKey._id;
|
||||||
arrayReturn = true;
|
arrayReturn = true;
|
||||||
|
@ -79,9 +79,11 @@ async function apikey(req: Request, _: Response, next: NextFunction) {
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const instanceByKey = await repository.auth.findByKey(key);
|
if (req.originalUrl.includes('/instance/fetchInstances')) {
|
||||||
if (instanceByKey) {
|
const instanceByKey = await repository.auth.findByKey(key);
|
||||||
return next();
|
if (instanceByKey) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user