Enha: remove marks
This commit is contained in:
		| @@ -75,10 +75,25 @@ func getFullInfoByCtx(ctx context.Context) (*models.FullInfo, error) { | ||||
| 		} | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	// get card_marks | ||||
| 	if room.IsRunning && room.MimeDone { | ||||
| 		fillCardMarks(ctx, room) | ||||
| 	} | ||||
| 	resp.Room = room | ||||
| 	return resp, nil | ||||
| } | ||||
|  | ||||
| func fillCardMarks(ctx context.Context, room *models.Room) error { | ||||
| 	for i, card := range room.Cards { | ||||
| 		marks, err := repo.CardMarksByCardID(ctx, card.ID) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		room.Cards[i].Marks = marks | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func getPlayerByCtx(ctx context.Context) (*models.Player, error) { | ||||
| 	username, ok := ctx.Value(models.CtxUsernameKey).(string) | ||||
| 	if !ok { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder