Moved functions out of main, added getSettings
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { ApiHandler } from '../../../types'
|
||||
import { settings } from '../../../main'
|
||||
|
||||
const path: ApiHandler['path'] = '/getSettings'
|
||||
|
||||
const handler: ApiHandler['handler'] = async (_, res) => {
|
||||
res.send(settings)
|
||||
}
|
||||
|
||||
const apiHandler: ApiHandler = { path, handler }
|
||||
|
||||
export default apiHandler
|
||||
|
||||
Reference in New Issue
Block a user