feat(server): added spotifyStatus endpoint to get spotify plugin status; feat(server): added plugin information on connect endpoint
This commit is contained in:
@@ -16,6 +16,7 @@ import getUserPlaylists from './getUserPlaylists'
|
||||
import getUserSpotifyPlaylists from './getUserSpotifyPlaylists'
|
||||
import getUserFavorites from './getUserFavorites'
|
||||
import getQueue from './getQueue'
|
||||
import spotifyStatus from './spotifyStatus'
|
||||
|
||||
export default [
|
||||
albumSearch,
|
||||
@@ -35,5 +36,6 @@ export default [
|
||||
getUserPlaylists,
|
||||
getUserSpotifyPlaylists,
|
||||
getUserFavorites,
|
||||
getQueue
|
||||
getQueue,
|
||||
spotifyStatus
|
||||
]
|
||||
|
||||
12
server/src/routes/api/get/spotifyStatus.ts
Normal file
12
server/src/routes/api/get/spotifyStatus.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ApiHandler } from '../../../types'
|
||||
import { plugins } from '../../../main'
|
||||
|
||||
const path: ApiHandler['path'] = '/spotifyStatus'
|
||||
|
||||
const handler: ApiHandler['handler'] = (_, res) => {
|
||||
res.send({ spotifyEnabled: plugins.spotify.enabled })
|
||||
}
|
||||
|
||||
const apiHandler: ApiHandler = { path, handler }
|
||||
|
||||
export default apiHandler
|
||||
Reference in New Issue
Block a user