mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Fix wrong API error response
This commit is contained in:
parent
bda82d2792
commit
dc455bcd87
@ -1,12 +1,12 @@
|
|||||||
from app.models import PackageRelease, db, Permission
|
from app.models import PackageRelease, db, Permission
|
||||||
from app.tasks.importtasks import makeVCSRelease
|
from app.tasks.importtasks import makeVCSRelease
|
||||||
from celery import uuid
|
from celery import uuid
|
||||||
from flask import jsonify, abort, url_for
|
from flask import jsonify, abort, make_response, url_for
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
def error(status, message):
|
def error(status, message):
|
||||||
abort(status, jsonify({ "success": False, "error": message }))
|
abort(make_response(jsonify({ "success": False, "error": message }), status))
|
||||||
|
|
||||||
|
|
||||||
def handleCreateRelease(token, package, title, ref):
|
def handleCreateRelease(token, package, title, ref):
|
||||||
|
Loading…
Reference in New Issue
Block a user