mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
Add Audible region config and user password change modal
Implements configurable Audible region selection in setup and admin settings, affecting all Audible API calls and triggering data refresh on change. Adds a user-facing 'Change Password' modal in the header for local users, moving password change from admin-only to all local users via a new /api/auth/change-password endpoint. Updates documentation, API routes, and context to support these features, and removes the old admin-only password change flow.
This commit is contained in:
@@ -17,6 +17,7 @@ export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const {
|
||||
backendMode,
|
||||
audibleRegion,
|
||||
admin,
|
||||
plex,
|
||||
audiobookshelf,
|
||||
@@ -146,6 +147,13 @@ export async function POST(request: NextRequest) {
|
||||
create: { key: 'system.backend_mode', value: backendMode },
|
||||
});
|
||||
|
||||
// Save Audible region (default to 'us' if not provided)
|
||||
await prisma.configuration.upsert({
|
||||
where: { key: 'audible.region' },
|
||||
update: { value: audibleRegion || 'us', category: 'system' },
|
||||
create: { key: 'audible.region', value: audibleRegion || 'us', category: 'system' },
|
||||
});
|
||||
|
||||
if (backendMode === 'plex') {
|
||||
// Plex configuration
|
||||
await prisma.configuration.upsert({
|
||||
|
||||
Reference in New Issue
Block a user