Commit 28372eb1 authored by PidgeyL's avatar PidgeyL
Browse files

statuscode bugfix

parent 6bf6ac64
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ class API():
      data = error = None
      # Get data (and possibly errors)
      try:
        data = funct(*args, **kwargs)
        data = (funct(*args, **kwargs), 200)
      except APIError as e:
        error = ({'status': 'error', 'reason': e.message}, e.status)
      except Exception as e:
@@ -136,7 +136,6 @@ class API():
            else:
              data = ({'status': 'error', 'reason': 'Unknown Content-type requested'}, 415)
              returnType = 'application/json'
          if type(data) is not str:
          if type(data) is tuple:
            data = list(data)
            data[0] = json.dumps(bsonConverter(data[0]), indent=2, sort_keys=True, default=json_util.default)