fix: missing creator id in shortcut cache (#915)

fix: missing creatot id in shortcut cache
This commit is contained in:
Stephen Zhou 2023-01-07 12:45:55 +08:00 committed by GitHub
parent e2e8130f4c
commit 529c9b34a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,13 +217,14 @@ func patchShortcut(ctx context.Context, tx *sql.Tx, patch *api.ShortcutPatch) (*
UPDATE shortcut
SET ` + strings.Join(set, ", ") + `
WHERE id = ?
RETURNING id, title, payload, created_ts, updated_ts, row_status
RETURNING id, title, payload, creator_id, created_ts, updated_ts, row_status
`
var shortcutRaw shortcutRaw
if err := tx.QueryRowContext(ctx, query, args...).Scan(
&shortcutRaw.ID,
&shortcutRaw.Title,
&shortcutRaw.Payload,
&shortcutRaw.CreatorID,
&shortcutRaw.CreatedTs,
&shortcutRaw.UpdatedTs,
&shortcutRaw.RowStatus,