unique quiz constraint
This commit is contained in:
@@ -26,7 +26,7 @@ func writeQuizError(w http.ResponseWriter, err error) {
|
||||
case errors.Is(err, repository.ErrQuizNotStarted), errors.Is(err, repository.ErrQuizNotFinished):
|
||||
response.Error(w, http.StatusConflict, err.Error())
|
||||
case errors.Is(err, repository.ErrQuizNotCurrent), errors.Is(err, repository.ErrQuizAlreadyAnswer),
|
||||
errors.Is(err, service.ErrQuizLocked):
|
||||
errors.Is(err, service.ErrQuizLocked), errors.Is(err, repository.ErrQuizTargetTaken):
|
||||
response.Error(w, http.StatusConflict, err.Error())
|
||||
case errors.Is(err, repository.ErrQuizBadOption), errors.Is(err, repository.ErrQuizChoiceCount),
|
||||
errors.Is(err, service.ErrQuizNoCorrect),
|
||||
|
||||
Reference in New Issue
Block a user