1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 13:05:23 +02:00

Make API work with new schema

This commit is contained in:
Harvey Kandola 2018-09-19 16:03:29 +01:00
parent 28342fcf5e
commit 4f0cc2f616
48 changed files with 1218 additions and 1097 deletions

View file

@ -73,9 +73,9 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
pin.RefID = uniqueid.Generate()
pin.OrgID = ctx.OrgID
pin.UserID = ctx.UserID
pin.Pin = strings.TrimSpace(pin.Pin)
if len(pin.Pin) > 20 {
pin.Pin = pin.Pin[0:20]
pin.Name = strings.TrimSpace(pin.Name)
if len(pin.Name) > 20 {
pin.Name = pin.Name[0:20]
}
ctx.Transaction, err = h.Runtime.Db.Beginx()