Skip to content

Commit e1c8c36

Browse files
committed
return token expiry as unix time
1 parent c372571 commit e1c8c36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/api/tokens.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (app *application) createAuthenticationTokenHandler(c echo.Context) error {
6969
return c.JSON(http.StatusInternalServerError, envelope{"error": "internal server error"})
7070
}
7171

72-
return c.JSON(http.StatusCreated, envelope{"token": token.Plaintext, "expiry": expiry})
72+
return c.JSON(http.StatusCreated, envelope{"token": token.Plaintext, "expiry": expiry.Unix()})
7373
}
7474

7575
func (app *application) createPasswordResetTokenHandler(c echo.Context) error {

0 commit comments

Comments
 (0)