Fix relations are not populated if API key is read-only

Signed-off-by: harimkims <harimkims@gmail.com>
This commit is contained in:
harimkims 2021-12-21 22:37:43 +09:00
parent 4497124c87
commit a926999b29

View File

@ -60,7 +60,8 @@ const verify = (auth, config) => {
* scopes. If the route has no scope, then you can't get access to it.
*/
if (config.scope && config.scope.every(isReadScope)) {
const scopes = Array.isArray(config.scope) ? config.scope : [config.scope];
if (config.scope && scopes.every(isReadScope)) {
return;
}