Chore: Deprecate ID in GetFolderQuery (#77647)

This commit is contained in:
Kat Yang
2023-11-15 10:30:00 -05:00
committed by GitHub
parent a640d9d395
commit 8d581b8358
7 changed files with 13 additions and 6 deletions
+2 -1
View File
@@ -67,7 +67,7 @@ func (ss *sqlStore) Create(ctx context.Context, cmd folder.CreateFolderCommand)
}
foldr, err = ss.Get(ctx, folder.GetFolderQuery{
ID: &lastInsertedID,
ID: &lastInsertedID, // nolint:staticcheck
})
if err != nil {
return err
@@ -164,6 +164,7 @@ func (ss *sqlStore) Get(ctx context.Context, q folder.GetFolderQuery) (*folder.F
switch {
case q.UID != nil:
exists, err = sess.SQL("SELECT * FROM folder WHERE uid = ? AND org_id = ?", q.UID, q.OrgID).Get(foldr)
// nolint:staticcheck
case q.ID != nil:
exists, err = sess.SQL("SELECT * FROM folder WHERE id = ?", q.ID).Get(foldr)
case q.Title != nil: