add CreatePlanet and put planet in solar system

This commit is contained in:
arnaucube
2019-06-13 22:41:47 +02:00
parent 0cd29328b4
commit 5965f2dec1
11 changed files with 141 additions and 45 deletions

View File

@@ -50,12 +50,13 @@ type LoginMsg struct {
func handleLogin(c *gin.Context) {
var loginMsg LoginMsg
c.BindJSON(&loginMsg)
user, err := userservice.Login(loginMsg.Email, loginMsg.Password)
token, user, err := userservice.Login(loginMsg.Email, loginMsg.Password)
if err != nil {
fail(c, err, "error on login")
return
}
c.JSON(200, gin.H{
"user": user,
"token": token,
"user": user,
})
}