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