mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(api): public settings route (#57)
adds public settings route that provides initalized value to check if the app has been configured for the first time
This commit is contained in:
@@ -4,6 +4,7 @@ import authRoutes from './auth';
|
||||
import { checkUser, isAuthenticated } from '../middleware/auth';
|
||||
import settingsRoutes from './settings';
|
||||
import { Permission } from '../lib/permissions';
|
||||
import { getSettings } from '../lib/settings';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -16,7 +17,13 @@ router.use(
|
||||
);
|
||||
router.use('/auth', authRoutes);
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
router.get('/settings/public', (_req, res) => {
|
||||
const settings = getSettings();
|
||||
|
||||
return res.status(200).json(settings.public);
|
||||
});
|
||||
|
||||
router.get('/', (_req, res) => {
|
||||
return res.status(200).json({
|
||||
api: 'Overseerr API',
|
||||
version: '1.0',
|
||||
|
Reference in New Issue
Block a user