unique quiz constraint

This commit is contained in:
Krispire Admin
2026-10-16 15:23:06 +05:30
parent b1f78b1655
commit eb02d08f14
6 changed files with 128 additions and 6 deletions
+1 -1
View File
@@ -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),