Skip to content

Commit 04d2dc7

Browse files
committed
minor compacting
1 parent 08a64cb commit 04d2dc7

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/Routers/FilesRouter.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,17 @@ export class FilesRouter {
9797
const user = req.auth.user;
9898
const isLinked = user && Parse.AnonymousUtils.isLinked(user);
9999
if (!config.fileUpload.enableForAnonymousUser && isLinked) {
100-
next(
101-
new Parse.Error(
102-
Parse.Error.FILE_SAVE_ERROR,
103-
'File upload by anonymous user is disabled.'
104-
)
105-
);
100+
next(new Parse.Error(
101+
Parse.Error.FILE_SAVE_ERROR,
102+
'File upload by anonymous user is disabled.'
103+
));
106104
return;
107105
}
108106
if (!config.fileUpload.enableForAuthenticatedUser && !isLinked && user) {
109-
next(
110-
new Parse.Error(
111-
Parse.Error.FILE_SAVE_ERROR,
112-
'File upload by authenticated user is disabled.'
113-
)
114-
);
107+
next(new Parse.Error(
108+
Parse.Error.FILE_SAVE_ERROR,
109+
'File upload by authenticated user is disabled.'
110+
));
115111
return;
116112
}
117113
if (!config.fileUpload.enableForPublic && !user) {

0 commit comments

Comments
 (0)