forked from ebhomengo/niki
fix(repository): replace "assigned-sender-agent" with entity.KindBoxReqAssignedSenderAgentStatus.String()
This commit is contained in:
parent
ad916d7ae7
commit
5eb962dc43
|
@ -12,8 +12,8 @@ import (
|
||||||
func (d DB) GetAwaitingDeliveryByAgent(ctx context.Context, kindBoxReqID uint, agentID uint) (entity.KindBoxReq, error) {
|
func (d DB) GetAwaitingDeliveryByAgent(ctx context.Context, kindBoxReqID uint, agentID uint) (entity.KindBoxReq, error) {
|
||||||
const op = "mysqlkindboxreq.GetAwaitingDeliveryByAgent"
|
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 `
|
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)
|
row := d.conn.Conn().QueryRowContext(ctx, query, kindBoxReqID, agentID, entity.KindBoxReqAssignedSenderAgentStatus.String())
|
||||||
k, err := scanKindBoxReq(row)
|
k, err := scanKindBoxReq(row)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
|
|
Loading…
Reference in New Issue