Chore: actions methods rename
This commit is contained in:
@ -200,7 +200,7 @@ func HandleStartGame(w http.ResponseWriter, r *http.Request) {
|
||||
// Save action history
|
||||
action.RoomID = fi.Room.ID
|
||||
action.CreatedAt = time.Now()
|
||||
if err := repo.CreateAction(ctx, &action); err != nil {
|
||||
if err := repo.ActionCreate(ctx, &action); err != nil {
|
||||
if err := tx.Rollback(); err != nil {
|
||||
log.Error("failed to rollback transaction", "error", err)
|
||||
}
|
||||
@ -338,7 +338,7 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) {
|
||||
Number: num,
|
||||
}
|
||||
fi.Room.ActionHistory = append(fi.Room.ActionHistory, action)
|
||||
if err := repo.CreateAction(r.Context(), &action); err != nil {
|
||||
if err := repo.ActionCreate(r.Context(), &action); err != nil {
|
||||
abortWithError(w, err.Error())
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user