Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions development/backend/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,9 @@ const REQUEST_SCHEMA = {
minimum: 1,
description: 'How many items (must be positive)'
},
type: {
type: 'string',
enum: ['mysql', 'sqlite'],
type: {
type: 'string',
enum: ['postgresql', 'mysql'],
description: 'Database engine type'
}
},
Expand Down Expand Up @@ -649,7 +649,7 @@ const ERROR_RESPONSE_SCHEMA = {
interface RequestBody {
name: string;
count: number;
type: 'mysql' | 'sqlite';
type: 'postgresql' | 'mysql';
}

interface SuccessResponse {
Expand Down Expand Up @@ -824,7 +824,7 @@ if (request.body.name.length < 3) {
}

// BAD: Manual enum validation (redundant)
if (request.body.type !== 'mysql' && request.body.type !== 'sqlite') {
if (request.body.type !== 'postgresql' && request.body.type !== 'mysql') {
return reply.status(400).send({ error: 'Invalid database type' });
}
```
Expand Down
2 changes: 1 addition & 1 deletion development/backend/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The backend authentication system is built on several key components:
- **[Lucia v3](https://lucia-auth.com/)** - Core session management and authentication library
- **[Argon2](https://github.com/napi-rs/node-rs)** - Industry-standard password hashing
- **[Arctic](https://arctic.js.org/)** - OAuth 2.0 client library for provider integration
- **Database-backed sessions** - SQLite/Turso storage for session persistence
- **Database-backed sessions** - PostgreSQL storage for session persistence
- **Dual authentication** - Support for both cookie sessions and OAuth2 Bearer tokens

## Authentication Flow Types
Expand Down
Loading
Loading