Adding a "placeholder" to getUser.view endpoint

This commit is contained in:
Deluan
2016-03-03 18:44:39 -05:00
parent adfec414a1
commit 3b60b62aa1
4 changed files with 60 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package api
import "github.com/deluan/gosonic/api/responses"
type UsersController struct{ BaseAPIController }
// TODO This is a placeholder. The real one has to read this info from a config file
func (c *UsersController) GetUser() {
r := c.NewEmpty()
r.User = &responses.User{}
r.User.Username = c.GetParameter("username", "Required string parameter 'username' is not present")
r.User.StreamRole = true
r.User.DownloadRole = true
c.SendResponse(r)
}