generated from VLADIMIR/template
up
This commit is contained in:
@@ -135,7 +135,7 @@ func (s *GameResultsApplyService) apply(ctx context.Context, bundle *Bundle, dig
|
||||
return nil, err
|
||||
}
|
||||
if err == nil && !m.CreatedAt.After(latest.PreparedAt) {
|
||||
return nil, ErrReturnConflict
|
||||
return nil, &game_returns_repo.ConflictError{Reason: "уже загружен пакет с такой же или более поздней датой формирования. Создайте новый пакет на офлайн-сервере и проверьте его часы."}
|
||||
}
|
||||
current, err := game_returns_repo.Capture(ctx, tx, m.GameID)
|
||||
if err != nil {
|
||||
@@ -199,7 +199,7 @@ func (s *GameResultsApplyService) apply(ctx context.Context, bundle *Bundle, dig
|
||||
|
||||
func repeatReturn(saved *game_returns_repo.Return, digest string) (*game_returns_repo.Return, error) {
|
||||
if saved.SHA256 != digest {
|
||||
return nil, ErrReturnConflict
|
||||
return nil, &game_returns_repo.ConflictError{Reason: "пакет с этим идентификатором уже загружен, но содержимое ZIP-файла отличается. Загрузите исходный файл или создайте новый пакет на офлайн-сервере."}
|
||||
}
|
||||
return saved, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user