mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(api): validate plex when settings are saved
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
interface Library {
|
||||
id: string;
|
||||
@@ -47,6 +48,7 @@ interface PublicSettings {
|
||||
}
|
||||
|
||||
interface AllSettings {
|
||||
clientId?: string;
|
||||
main: MainSettings;
|
||||
plex: PlexSettings;
|
||||
radarr: RadarrSettings[];
|
||||
@@ -122,6 +124,15 @@ class Settings {
|
||||
this.data.public = data;
|
||||
}
|
||||
|
||||
get clientId(): string {
|
||||
if (!this.data.clientId) {
|
||||
this.data.clientId = uuidv4();
|
||||
this.save();
|
||||
}
|
||||
|
||||
return this.data.clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings Load
|
||||
*
|
||||
|
Reference in New Issue
Block a user