Simplify Subsonic API handler implementation

This commit is contained in:
Deluan
2022-11-21 12:57:56 -05:00
parent cd41d9a419
commit 19af11efbe
18 changed files with 280 additions and 564 deletions
+2 -2
View File
@@ -12,11 +12,11 @@ func NewSystemController() *SystemController {
return &SystemController{}
}
func (c *SystemController) Ping(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
func (api *Router) Ping(_ *http.Request) (*responses.Subsonic, error) {
return newResponse(), nil
}
func (c *SystemController) GetLicense(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
func (api *Router) GetLicense(_ *http.Request) (*responses.Subsonic, error) {
response := newResponse()
response.License = &responses.License{Valid: true}
return response, nil