15 lines
256 B
Python
15 lines
256 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Miscellaneous tools and helper functions.
|
|
"""
|
|
from flask import jsonify
|
|
|
|
|
|
def make_error(code, message):
|
|
"""
|
|
Returns a JSON error.
|
|
"""
|
|
res = jsonify(ok=False, status=code, message=message)
|
|
res.status_code = code
|
|
return res
|