mirror of
https://github.com/wizarrrr/wizarr.git
synced 2026-04-19 05:28:33 -04:00
- Updated `InvitationCreateRequest` model to change `server_ids` from required to optional with improved description. - Enhanced `library_model` to include `external_id`, `server_name`, and `enabled` fields. - Modified `InvitationFlowManager` to prioritize new many-to-many relationship checks for invitations. - Created a new migration file to merge branches related to API key and foreign key improvements. - Added comprehensive tests for API endpoints, including status, users, invitations, libraries, servers, and API key management. - Implemented error handling tests for malformed JSON and inactive API keys.
18 lines
532 B
Python
18 lines
532 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, SubmitField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
class ApiKeyCreateForm(FlaskForm):
|
|
"""Form for creating a new API key."""
|
|
|
|
name = StringField(
|
|
"Key Name",
|
|
validators=[
|
|
DataRequired(),
|
|
Length(min=1, max=100, message="Name must be between 1 and 100 characters"),
|
|
],
|
|
render_kw={"placeholder": "Enter a descriptive name for this API key"},
|
|
)
|
|
submit = SubmitField("Create API Key")
|