deploy: Update frontend build for deployment

This commit is contained in:
super committed 2026-03-03 11:37:34 +08:00
1 parent f18b6ce2df
commit b3e233bf76
6 files changed
+306 -2266

No files matched your search

+5 -2
View File
@@ -10,15 +10,18 @@ with app.app_context():
print(f"Found admin user. Current role: {admin.role}")
if admin.role != 'admin':
admin.role = 'admin'
db.session.commit()
print("Updated admin user role to 'admin'")
# Always update password to ensure it's set correctly
admin.set_password('Hxit@54321')
db.session.commit()
print("Updated admin user password to 'Hxit@54321'")
else:
print("Admin user not found. Creating...")
admin = User(username='admin', email='admin@example.com', role='admin')
admin.set_password('Hxit@54321')
db.session.add(admin)
db.session.commit()
print("Created admin user with role 'admin'")
print("Created admin user with role 'admin' and password 'Hxit@54321'")
# Also check if there are other users that should be admin but aren't
users = User.query.all()