Compare commits
No commits in common. "541d0fce2704d39aa7ec7aea0987d3ac5d7af694" and "dfd3bb5f48ea75aac526edd78221c33787a06c78" have entirely different histories.
541d0fce27
...
dfd3bb5f48
1 changed files with 1 additions and 7 deletions
|
|
@ -71,10 +71,7 @@ func sqlDate2oapi(p_date pgtype.Timestamptz) *time.Time {
|
|||
|
||||
func oapiDate2sql(t *time.Time) pgtype.Timestamptz {
|
||||
if t == nil {
|
||||
return pgtype.Timestamptz{
|
||||
Time: time.Now(),
|
||||
Valid: true,
|
||||
}
|
||||
return pgtype.Timestamptz{Valid: false}
|
||||
}
|
||||
return pgtype.Timestamptz{
|
||||
Time: *t,
|
||||
|
|
@ -389,9 +386,6 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue