Skip to content

Commit

Permalink
client: fix db query
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Apr 12, 2024
1 parent 06299cf commit fda83c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func RegisterClient(c *gin.Context) {
// return
// }
var node *models.Node
if err := db.Model(&models.Node{}).First(&node, region_id).Error; err != nil {
if err := db.Model(&models.Node{}).Where("id = ?", region_id).First(&node).Error; err != nil {
logwrapper.Errorf("failed to get node: %s", err)
httpo.NewErrorResponse(http.StatusBadRequest, err.Error()).SendD(c)
return
Expand Down

0 comments on commit fda83c7

Please sign in to comment.