forked from ebhomengo/niki
1
0
Fork 0

fix(repository): replace "assigned-sender-agent" with entity.KindBoxReqAssignedSenderAgentStatus.String()

This commit is contained in:
Erfan Mohammadi 2024-06-12 13:49:21 +03:30 committed by lmehdirezl
parent ad916d7ae7
commit 5eb962dc43
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ import (
func (d DB) GetAwaitingDeliveryByAgent(ctx context.Context, kindBoxReqID uint, agentID uint) (entity.KindBoxReq, error) {
const op = "mysqlkindboxreq.GetAwaitingDeliveryByAgent"
query := `SELECT * FROM kind_box_reqs WHERE id = ? AND sender_agent_id = ? AND status = 'assigned-sender-agent' AND deleted_at IS NULL `
row := d.conn.Conn().QueryRowContext(ctx, query, kindBoxReqID, agentID)
query := `SELECT * FROM kind_box_reqs WHERE id = ? AND sender_agent_id = ? AND status = ? AND deleted_at IS NULL `
row := d.conn.Conn().QueryRowContext(ctx, query, kindBoxReqID, agentID, entity.KindBoxReqAssignedSenderAgentStatus.String())
k, err := scanKindBoxReq(row)
if err != nil {
if err == sql.ErrNoRows {