1. akshell
  2. log

Commits

korenyushkin  committed 2f1d625

Changed HttpError usage by Forbidden usage.

  • Participants
  • Parent commits 39a915e
  • Branches 0.1

Comments (0)

Files changed (1)

File __main__.js

View file
     get: function (request, app, owner, spot) {
       var appDescr = describeApp(app);
       if (appDescr.developers.indexOf(request.user) == -1)
-        throw new HttpError('You are not a developer of ' + app + ' app',
-                            http.FORBIDDEN);
+        throw Forbidden('You are not a developer of ' + app + ' app');
       owner = (owner || request.get.owner || request.user).replace(/-/g, ' ');
       if (appDescr.developers.indexOf(owner) == -1)
         throw NotFound(owner + ' is not a developer of ' + app + ' app');
     post: function (request, app, owner, spot) {
       var delSpot = request.post.spot || '';
       if (!(delSpot || request.user == describeApp(app).admin))
-        throw HttpError('Forbidden', http.FORBIDDEN);
+        throw Forbidden();
       var place = rv.Place.where(
         {
           app: app,