Fix BASE_URL config loading, add tasks/projects; robust .env path resolution
- Config: try ENV_FILE, .env, ../.env for loading; trim trailing slash from BaseURL - Log BASE_URL at server startup for verification - .env.example: document BASE_URL - Tasks, projects, tags, migrations and related API/handlers Made-with: Cursor
This commit is contained in:
@@ -188,6 +188,86 @@
|
||||
"start": { "type": "string", "format": "date-time" },
|
||||
"end": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"Task": {
|
||||
"type": "object",
|
||||
"required": ["id", "title", "status", "priority", "owner_id", "created_at", "updated_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"title": { "type": "string", "minLength": 1, "maxLength": 500 },
|
||||
"description": { "type": "string", "nullable": true, "description": "Markdown supported" },
|
||||
"status": { "type": "string", "enum": ["todo", "in_progress", "done", "archived"] },
|
||||
"priority": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
||||
"due_date": { "type": "string", "format": "date-time", "nullable": true },
|
||||
"completed_at": { "type": "string", "format": "date-time", "nullable": true },
|
||||
"created_at": { "type": "string", "format": "date-time" },
|
||||
"updated_at": { "type": "string", "format": "date-time" },
|
||||
"owner_id": { "type": "string", "format": "uuid" },
|
||||
"project_id": { "type": "string", "format": "uuid", "nullable": true },
|
||||
"parent_id": { "type": "string", "format": "uuid", "nullable": true },
|
||||
"subtasks": { "type": "array", "items": { "$ref": "#/components/schemas/Task" } },
|
||||
"tags": { "type": "array", "items": { "$ref": "#/components/schemas/Tag" } },
|
||||
"completion_percentage": { "type": "integer", "nullable": true }
|
||||
}
|
||||
},
|
||||
"Project": {
|
||||
"type": "object",
|
||||
"required": ["id", "owner_id", "name", "color", "is_shared", "created_at", "updated_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"owner_id": { "type": "string", "format": "uuid" },
|
||||
"name": { "type": "string", "minLength": 1, "maxLength": 100 },
|
||||
"color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "example": "#3B82F6" },
|
||||
"is_shared": { "type": "boolean" },
|
||||
"deadline": { "type": "string", "format": "date-time", "nullable": true },
|
||||
"sort_order": { "type": "integer" },
|
||||
"created_at": { "type": "string", "format": "date-time" },
|
||||
"updated_at": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"Tag": {
|
||||
"type": "object",
|
||||
"required": ["id", "owner_id", "name", "color", "created_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"owner_id": { "type": "string", "format": "uuid" },
|
||||
"name": { "type": "string", "minLength": 1, "maxLength": 50 },
|
||||
"color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$", "example": "#6B7280" },
|
||||
"created_at": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"ProjectMember": {
|
||||
"type": "object",
|
||||
"required": ["user_id", "email", "role"],
|
||||
"properties": {
|
||||
"user_id": { "type": "string", "format": "uuid" },
|
||||
"email": { "type": "string", "format": "email" },
|
||||
"role": { "type": "string", "enum": ["owner", "editor", "viewer"] }
|
||||
}
|
||||
},
|
||||
"TaskReminder": {
|
||||
"type": "object",
|
||||
"required": ["id", "task_id", "type", "scheduled_at", "created_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"task_id": { "type": "string", "format": "uuid" },
|
||||
"type": { "type": "string", "enum": ["push", "email", "webhook", "telegram", "nostr"] },
|
||||
"config": { "type": "object", "additionalProperties": true },
|
||||
"scheduled_at": { "type": "string", "format": "date-time" },
|
||||
"created_at": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"TaskWebhook": {
|
||||
"type": "object",
|
||||
"required": ["id", "owner_id", "url", "events", "created_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"owner_id": { "type": "string", "format": "uuid" },
|
||||
"url": { "type": "string", "format": "uri" },
|
||||
"events": { "type": "array", "items": { "type": "string", "enum": ["created", "status_change", "completion"] } },
|
||||
"secret": { "type": "string", "nullable": true },
|
||||
"created_at": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user