mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
chore: rename "InsertOrUpdate" to Upsert around the codebase (#6823)
* chore: rename "InsertOrUpdate" to Upsert around the codebase The shorter name uses up less line width, is easier to read and is used more often. * make gen
This commit is contained in:
@@ -148,7 +148,7 @@ func (api *API) putAppearance(rw http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
err = api.Database.InsertOrUpdateServiceBanner(ctx, string(serviceBannerJSON))
|
||||
err = api.Database.UpsertServiceBanner(ctx, string(serviceBannerJSON))
|
||||
if err != nil {
|
||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||
Message: fmt.Sprintf("database error: %+v", err),
|
||||
@@ -156,7 +156,7 @@ func (api *API) putAppearance(rw http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
err = api.Database.InsertOrUpdateLogoURL(ctx, appearance.LogoURL)
|
||||
err = api.Database.UpsertLogoURL(ctx, appearance.LogoURL)
|
||||
if err != nil {
|
||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||
Message: fmt.Sprintf("database error: %+v", err),
|
||||
|
||||
Reference in New Issue
Block a user