mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -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) {
|
||||
const instanceByKey = await this.repository.auth.findByKey(key);
|
||||
console.log('instanceByKey', instanceByKey);
|
||||
if (instanceByKey) {
|
||||
name = instanceByKey._id;
|
||||
arrayReturn = true;
|
||||
|
@ -79,9 +79,11 @@ async function apikey(req: Request, _: Response, next: NextFunction) {
|
||||
return next();
|
||||
}
|
||||
} else {
|
||||
const instanceByKey = await repository.auth.findByKey(key);
|
||||
if (instanceByKey) {
|
||||
return next();
|
||||
if (req.originalUrl.includes('/instance/fetchInstances')) {
|
||||
const instanceByKey = await repository.auth.findByKey(key);
|
||||
if (instanceByKey) {
|
||||
return next();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user