Update team and collection authorization

This commit is contained in:
Tom Moor
2018-02-18 01:14:51 -08:00
parent 2f81eb5e87
commit e84fb5e6ba
17 changed files with 181 additions and 135 deletions

View File

@ -39,8 +39,13 @@ api.use(async (ctx, next) => {
}
if (message.match('Authorization error')) {
ctx.status = 404;
message = 'Not Found';
if (ctx.path.match('info')) {
ctx.status = 404;
message = 'Not Found';
} else {
ctx.status = 403;
message = 'Authorization Required';
}
}
if (ctx.status === 500) {