fix
This commit is contained in:
parent
53011b67ae
commit
103a872be2
2 changed files with 3 additions and 1 deletions
|
|
@ -386,6 +386,9 @@ func (s Server) AddUserTitle(ctx context.Context, request oapi.AddUserTitleReque
|
|||
// fmt.Println(pgErr.Code) // => 42601
|
||||
if pgErr.Code == pgErrDuplicateKey { //duplicate key value
|
||||
return oapi.AddUserTitle409Response{}, nil
|
||||
} else {
|
||||
log.Errorf("%v", err)
|
||||
return oapi.AddUserTitle500Response{}, nil
|
||||
}
|
||||
} else {
|
||||
log.Errorf("%v", err)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ CREATE TABLE usertitles (
|
|||
status usertitle_status_t NOT NULL,
|
||||
rate int CHECK (rate > 0 AND rate <= 10),
|
||||
review_id bigint REFERENCES reviews (id) ON DELETE SET NULL,
|
||||
ctime timestamptz NOT NULL DEFAULT now(),
|
||||
ftime timestamptz NOT NULL DEFAULT now()
|
||||
-- // TODO: series status
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue