diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index 6aa07ec..2e4e59d 100644 Binary files a/__pycache__/app.cpython-313.pyc and b/__pycache__/app.cpython-313.pyc differ diff --git a/migrations/versions/add_mindmap_shares_table.py b/migrations/versions/add_mindmap_shares_table.py new file mode 100644 index 0000000..4aa52dc --- /dev/null +++ b/migrations/versions/add_mindmap_shares_table.py @@ -0,0 +1,38 @@ +"""add mindmap shares table + +Revision ID: add_mindmap_shares +Revises: add_missing_user_fields +Create Date: 2025-05-10 23:20:00.000000 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import sqlite + +# revision identifiers, used by Alembic. +revision = 'add_mindmap_shares' +down_revision = 'add_missing_user_fields' +branch_labels = None +depends_on = None + + +def upgrade(): + # Erstelle PermissionType Enum + op.create_table('mindmap_share', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('mindmap_id', sa.Integer(), nullable=False), + sa.Column('shared_by_id', sa.Integer(), nullable=False), + sa.Column('shared_with_id', sa.Integer(), nullable=False), + sa.Column('permission_type', sa.String(20), nullable=False), + sa.Column('created_at', sa.DateTime(), nullable=True), + sa.Column('last_accessed', sa.DateTime(), nullable=True), + sa.ForeignKeyConstraint(['mindmap_id'], ['user_mindmap.id'], ), + sa.ForeignKeyConstraint(['shared_by_id'], ['user.id'], ), + sa.ForeignKeyConstraint(['shared_with_id'], ['user.id'], ), + sa.PrimaryKeyConstraint('id'), + sa.UniqueConstraint('mindmap_id', 'shared_with_id', name='unique_mindmap_share') + ) + + +def downgrade(): + op.drop_table('mindmap_share') \ No newline at end of file diff --git a/templates/errors/400.html b/templates/errors/400.html index 7bd28df..87ccf67 100644 --- a/templates/errors/400.html +++ b/templates/errors/400.html @@ -3,36 +3,46 @@ {% block title %}400 - Ungültige Anfrage{% endblock %} {% block content %} -
Die Anfrage konnte nicht verarbeitet werden.
+{{ error }}
+ {% else %} +Die Anfrage enthält ungültige oder fehlerhafte Daten und konnte nicht verarbeitet werden.
+ {% endif %}Die Anfrage konnte nicht verarbeitet werden. Bitte überprüfen Sie Ihre Eingaben und versuchen Sie es erneut.
- {% if error %} -Benötigen Sie Hilfe? Kontaktieren Sie uns
+ +Hier sind einige Dinge, die Sie versuchen können:
+