Fixing getWeeklyReport tests
This commit is contained in:
parent
9f20d46fa6
commit
9070846b0b
3 changed files with 3 additions and 5 deletions
|
@ -39,11 +39,8 @@ func (gs *GState) GetWeeklyReport(c *fiber.Ctx) error {
|
|||
// Extract the necessary parameters from the request
|
||||
println("GetWeeklyReport")
|
||||
user := c.Locals("user").(*jwt.Token)
|
||||
println(user)
|
||||
claims := user.Claims.(jwt.MapClaims)
|
||||
println(claims)
|
||||
username := claims["name"].(string)
|
||||
println(username)
|
||||
|
||||
// Extract project name and week from query parameters
|
||||
projectName := c.Query("projectName")
|
||||
|
|
|
@ -78,6 +78,7 @@ func main() {
|
|||
server.Post("/api/loginrenew", gs.LoginRenew)
|
||||
server.Delete("/api/userdelete/:username", gs.UserDelete) // Perhaps just use POST to avoid headaches
|
||||
server.Post("/api/project", gs.CreateProject)
|
||||
server.Get("/api/getWeeklyReport", gs.GetWeeklyReport)
|
||||
|
||||
// Announce the port we are listening on and start the server
|
||||
err = server.Listen(fmt.Sprintf(":%d", conf.Port))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue