2020-01-19 14:21:44 -09:00
|
|
|
package subsonic
|
2016-03-09 06:22:10 -09:00
|
|
|
|
2020-01-07 10:56:26 -09:00
|
|
|
import (
|
|
|
|
|
"net/http"
|
2016-03-09 06:22:10 -09:00
|
|
|
|
2020-01-23 15:44:08 -09:00
|
|
|
"github.com/navidrome/navidrome/server/subsonic/responses"
|
2020-01-07 10:56:26 -09:00
|
|
|
)
|
2016-03-09 06:22:10 -09:00
|
|
|
|
2020-01-07 10:56:26 -09:00
|
|
|
type SystemController struct{}
|
|
|
|
|
|
|
|
|
|
func NewSystemController() *SystemController {
|
|
|
|
|
return &SystemController{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *SystemController) Ping(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
|
2020-08-13 18:11:18 -08:00
|
|
|
return newResponse(), nil
|
2016-03-09 06:22:10 -09:00
|
|
|
}
|
|
|
|
|
|
2020-01-07 10:56:26 -09:00
|
|
|
func (c *SystemController) GetLicense(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
|
2020-08-13 18:11:18 -08:00
|
|
|
response := newResponse()
|
2016-03-09 06:22:10 -09:00
|
|
|
response.License = &responses.License{Valid: true}
|
2020-01-07 10:56:26 -09:00
|
|
|
return response, nil
|
2016-03-09 06:22:10 -09:00
|
|
|
}
|