fix mistake
This commit is contained in:
@@ -20,7 +20,7 @@ func (h *Handler) GetCurrentUser(c echo.Context) error {
|
||||
|
||||
u := new(model.User)
|
||||
|
||||
tx := h.DB.First(&u, userId)
|
||||
tx := h.DB.Where("id = ?", userId).First(&u, userId)
|
||||
|
||||
if tx.RowsAffected == 0 {
|
||||
return c.NoContent(http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user