Skip to content

Commit

Permalink
Refactor VerifyMobileUser function in middleware.go to handle cache n…
Browse files Browse the repository at this point in the history
…ot found error for mobile users
waveyboym committed Sep 30, 2024
1 parent 37a47bf commit db05100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion occupi-backend/pkg/middleware/middleware.go
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ func VerifyMobileUser(ctx *gin.Context, appsession *models.AppSession) {

if utils.IsMobileDevice(ctx) {
user, errv := cache.GetMobileUser(appsession, claims.Email)
if errv != nil {
if errv != nil && errv.Error() != "cache not found" {
ctx.JSON(http.StatusBadRequest,
utils.ErrorResponse(
http.StatusBadRequest,

0 comments on commit db05100

Please sign in to comment.