comnpany to cm
This commit is contained in:
@@ -19,7 +19,7 @@ func tmplPost(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
sq := "update company set tmpl = $2 where id = $1"
|
||||
sq := "update cm set tmpl = $2 where id = $1"
|
||||
_, err = dbu.DB.Exec(r.Context(), sq, companyID, body)
|
||||
if err != nil {
|
||||
mhttp.InternalServerError(w, err)
|
||||
@@ -33,7 +33,7 @@ func tmplGet(w http.ResponseWriter, r *http.Request) {
|
||||
companyID := cmn.StrToInt64(chi.URLParam(r, "companyID"))
|
||||
var body json.RawMessage
|
||||
|
||||
sq := "select tmpl from company where id = $1"
|
||||
sq := "select tmpl from cm where id = $1"
|
||||
err := dbu.DB.QueryRow(r.Context(), sq, companyID).Scan(&body)
|
||||
if err != nil {
|
||||
mhttp.InternalServerError(w, err)
|
||||
|
||||
Reference in New Issue
Block a user