Connect Athena to Spotify

This commit is contained in:
2022-01-15 19:35:43 +01:00
parent f6070b20ee
commit 240fcbac90
23 changed files with 684 additions and 99 deletions

View File

@@ -21,6 +21,17 @@ Route.group(() => {
Route.post('/commands', 'StatsController.incrementCommandCount')
Route.post('/builds', 'StatsController.incrementBuildCount')
}).prefix('stats')
Route.group(() => {
Route.get('/', 'SongsController.getCurrentSong')
Route.get('/history', 'SongsController.getHistory')
Route.get('/top/track', 'SongsController.getTopTrack')
Route.get('/top/artist', 'SongsController.getTopArtist')
Route.get('/authorize', 'SongsController.authorize')
Route.get('/callback', 'SongsController.callback')
}).prefix('spotify')
}).middleware('auth:web,api')
Route.get('/files/:filename', async({ response, params }) => {

View File

@@ -15,6 +15,7 @@ Route.get('/', async({ response }: HttpContextContract) => {
profile: `${BASE_URL}/me`,
stats: `${BASE_URL}/stats`,
states: `${BASE_URL}/states`,
songs: `${BASE_URL}/spotify`,
locations: `${BASE_URL}/locations`,
},
})