-
Notifications
You must be signed in to change notification settings - Fork 0
New database models. #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the database models and updates the routing structure for user, guild, config, and public API endpoints while removing outdated API endpoints. Key changes include renaming model fields and variables to camelCase, updating error messages and routes accordingly, and removing obsolete files.
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/user.ts | Introduces new endpoints and updated user model field naming |
| src/routes/index.ts | Updates route imports to use new naming conventions |
| src/routes/guild.ts | Implements the new guild config model with updated structure |
| src/routes/config.ts | Adjusts config endpoint to integrate with the new model schema |
| src/public_api/user.ts | Adjusts public user data output to match updated model naming |
| src/public_api/frame.ts | Refactors frame generation endpoint with new parameters and error messages |
| src/models/user_schema.ts | Updates user model fields and creation logic with camelCase field names |
| src/models/token_schema.ts | Renames token id field to camelCase |
| src/models/guild_schema.ts | Updates guild config structure and field naming |
| src/models/config_schema.ts | Refactors config schema including new level system and frame caching logic |
| src/helpers/generateFrame.ts | Adjusts parameter naming in frame generation function |
| (Several api/* files) | Deprecated legacy API endpoints were removed |
Files not reviewed (1)
- .env.example: Language not supported
Comments suppressed due to low confidence (2)
src/models/config_schema.ts:27
- Property 'extraobjects' is inconsistently named; consider renaming it to 'extraObjects' for consistency with other parts of the codebase.
extraobjects: { type: Map, of: Object },
src/public_api/frame.ts:43
- The 'fs' module is used but not imported. Consider adding 'import fs from "fs"' at the top of the file.
if (!fs.existsSync(cachePath)) {
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Data from the old database gets moved after everything works as it should. The best way to do this is with a script on the side, I think :)