|
|
|
@ -4,8 +4,10 @@ import * as api from '../client/src/api'; |
|
|
|
|
|
|
|
|
|
import { CreateSongEndpointHandler } from './endpoints/CreateSongEndpointHandler'; |
|
|
|
|
import { CreateArtistEndpointHandler } from './endpoints/CreateArtistEndpointHandler'; |
|
|
|
|
import { ListSongsEndpointHandler } from './endpoints/ListSongsEndpointHandler'; |
|
|
|
|
import { ListArtistsEndpointHandler } from './endpoints/ListArtistsEndpointHandler'; |
|
|
|
|
import { QuerySongsEndpointHandler } from './endpoints/QuerySongsEndpointHandler'; |
|
|
|
|
import { QueryArtistsEndpointHandler } from './endpoints/QueryArtistsEndpointHandler'; |
|
|
|
|
import { ArtistDetailsEndpointHandler } from './endpoints/ArtistDetailsEndpointHandler' |
|
|
|
|
import { SongDetailsEndpointHandler } from './endpoints/SongDetailsEndpointHandler'; |
|
|
|
|
import { ModifyArtistEndpointHandler } from './endpoints/ModifyArtistEndpointHandler'; |
|
|
|
|
import { ModifySongEndpointHandler } from './endpoints/ModifySongEndpointHandler'; |
|
|
|
|
import * as endpointTypes from './endpoints/types'; |
|
|
|
@ -27,11 +29,13 @@ const SetupApp = (app: any) => { |
|
|
|
|
|
|
|
|
|
// Set up REST API endpoints
|
|
|
|
|
app.post(api.CreateSongEndpoint, invokeHandler(CreateSongEndpointHandler)); |
|
|
|
|
app.get(api.ListSongsEndpoint, invokeHandler(ListSongsEndpointHandler)); |
|
|
|
|
app.get(api.QuerySongsEndpoint, invokeHandler(QuerySongsEndpointHandler)); |
|
|
|
|
app.post(api.CreateArtistEndpoint, invokeHandler(CreateArtistEndpointHandler)); |
|
|
|
|
app.get(api.ListArtistsEndpoint, invokeHandler(ListArtistsEndpointHandler)); |
|
|
|
|
app.get(api.QueryArtistsEndpoint, invokeHandler(QueryArtistsEndpointHandler)); |
|
|
|
|
app.post(api.ModifyArtistEndpoint, invokeHandler(ModifyArtistEndpointHandler)); |
|
|
|
|
app.post(api.ModifySongEndpoint, invokeHandler(ModifySongEndpointHandler)); |
|
|
|
|
app.get(api.SongDetailsEndpoint, invokeHandler(SongDetailsEndpointHandler)); |
|
|
|
|
app.get(api.ArtistDetailsEndpoint, invokeHandler(ArtistDetailsEndpointHandler)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export { SetupApp } |