?
This commit is contained in:
parent
9fa66bd05a
commit
f9fb8816bc
@ -64,16 +64,21 @@ namespace asg_form.Controllers
|
|||||||
user_id = msg.invitedId,
|
user_id = msg.invitedId,
|
||||||
my_request = new List<(int, int)>()
|
my_request = new List<(int, int)>()
|
||||||
};
|
};
|
||||||
invitationRecord.my_request.Add((invitor_id: (int)userId, match_id: msg.matchId));
|
invitationRecord.my_request.Add((invitor_id: userId, match_id: msg.matchId));
|
||||||
|
|
||||||
await sb.SaveChangesAsync();
|
await sb.SaveChangesAsync();
|
||||||
|
var data = new
|
||||||
|
{
|
||||||
|
invitedId = userId,
|
||||||
|
matchId = msg.matchId,
|
||||||
|
};
|
||||||
|
return Ok(new { code = 200, message = "邀请成功", data });
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return Ok(new { code = 500, message = "服务器错误", details = ex.Message });
|
return Ok(new { code = 500, message = "服务器错误", details = ex.Message });
|
||||||
}
|
}
|
||||||
return Ok(new { code = 200, message = "邀请成功" });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user