Compare commits
No commits in common. "55278c8413a9b01286f46f032f9ba8aefc2a931e" and "57a03a80cc0e2f2b503840972aac6645c4813fa7" have entirely different histories.
55278c8413
...
57a03a80cc
|
@ -44,7 +44,6 @@ class ModelSerializeMixin:
|
|||
class Serial(TypeDecorator):
|
||||
"""Same as MariaDB Serial used for IDs"""
|
||||
|
||||
cache_ok=True
|
||||
impl = BigInteger().with_variant(mysql.BIGINT(unsigned=True), "mysql").with_variant(sqlite.INTEGER, "sqlite")
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Optional
|
||||
|
||||
from werkzeug.exceptions import BadRequest, Conflict, NotFound
|
||||
from werkzeug.exceptions import BadRequest, NotFound
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from flaschengeist import logger
|
||||
|
@ -41,7 +41,7 @@ def create_event_type(name):
|
|||
db.session.commit()
|
||||
return event
|
||||
except IntegrityError:
|
||||
raise Conflict("Name already exists")
|
||||
raise BadRequest("Name already exists")
|
||||
|
||||
|
||||
def rename_event_type(identifier, new_name):
|
||||
|
@ -50,7 +50,7 @@ def rename_event_type(identifier, new_name):
|
|||
try:
|
||||
db.session.commit()
|
||||
except IntegrityError:
|
||||
raise Conflict("Name already exists")
|
||||
raise BadRequest("Name already exists")
|
||||
|
||||
|
||||
def delete_event_type(name):
|
||||
|
|
|
@ -75,7 +75,7 @@ def list_users(current_session):
|
|||
|
||||
@UsersPlugin.blueprint.route("/users/<userid>", methods=["GET"])
|
||||
@login_required()
|
||||
@headers({"Cache-Control": "private, must-revalidate, max-age=300"})
|
||||
@headers({"Cache-Control": "private, must-revalidate, max-age=3600"})
|
||||
def get_user(userid, current_session):
|
||||
"""Retrieve user by userid
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ If not you need to create user and database manually do (or similar on Windows):
|
|||
(
|
||||
echo "CREATE DATABASE flaschengeist;"
|
||||
echo "CREATE USER 'flaschengeist'@'localhost' IDENTIFIED BY 'flaschengeist';"
|
||||
echo "GRANT ALL PRIVILEGES ON flaschengeist.* TO 'flaschengeist'@'localhost';"
|
||||
echo "GRANT ALL PRIVILEGES ON 'flaschengeist'.* TO 'flaschengeist'@'localhost';"
|
||||
echo "FLUSH PRIVILEGES;"
|
||||
) | sudo mysql
|
||||
|
||||
|
|
Loading…
Reference in New Issue