mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
Chore: Deprecate FolderID in LibraryElement struct (#77377)
* Chore: Deprecate FolderID in LibraryElement struct * chore: format deprecated comment * chore: add remaining nolint comments
This commit is contained in:
parent
13c0268d6b
commit
f9b21083c6
@ -147,7 +147,7 @@ func (l *LibraryElementService) createLibraryElement(c context.Context, signedIn
|
||||
|
||||
element := model.LibraryElement{
|
||||
OrgID: signedInUser.GetOrgID(),
|
||||
FolderID: cmd.FolderID,
|
||||
FolderID: cmd.FolderID, // nolint:staticcheck
|
||||
UID: createUID,
|
||||
Name: cmd.Name,
|
||||
Model: updatedModel,
|
||||
@ -191,7 +191,7 @@ func (l *LibraryElementService) createLibraryElement(c context.Context, signedIn
|
||||
dto := model.LibraryElementDTO{
|
||||
ID: element.ID,
|
||||
OrgID: element.OrgID,
|
||||
FolderID: element.FolderID,
|
||||
FolderID: element.FolderID, // nolint:staticcheck
|
||||
UID: element.UID,
|
||||
Name: element.Name,
|
||||
Kind: element.Kind,
|
||||
@ -524,7 +524,7 @@ func (l *LibraryElementService) handleFolderIDPatches(ctx context.Context, eleme
|
||||
if err := l.requireEditPermissionsOnFolder(ctx, user, fromFolderID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// nolint:staticcheck
|
||||
elementToPatch.FolderID = toFolderID
|
||||
|
||||
return nil
|
||||
@ -574,7 +574,7 @@ func (l *LibraryElementService) patchLibraryElement(c context.Context, signedInU
|
||||
var libraryElement = model.LibraryElement{
|
||||
ID: elementInDB.ID,
|
||||
OrgID: signedInUser.GetOrgID(),
|
||||
FolderID: cmd.FolderID,
|
||||
FolderID: cmd.FolderID, // nolint:staticcheck
|
||||
UID: updateUID,
|
||||
Name: cmd.Name,
|
||||
Kind: elementInDB.Kind,
|
||||
@ -613,7 +613,7 @@ func (l *LibraryElementService) patchLibraryElement(c context.Context, signedInU
|
||||
dto = model.LibraryElementDTO{
|
||||
ID: libraryElement.ID,
|
||||
OrgID: libraryElement.OrgID,
|
||||
FolderID: libraryElement.FolderID,
|
||||
FolderID: libraryElement.FolderID, // nolint:staticcheck
|
||||
UID: libraryElement.UID,
|
||||
Name: libraryElement.Name,
|
||||
Kind: libraryElement.Kind,
|
||||
|
@ -20,8 +20,9 @@ const (
|
||||
|
||||
// LibraryElement is the model for library element definitions.
|
||||
type LibraryElement struct {
|
||||
ID int64 `xorm:"pk autoincr 'id'"`
|
||||
OrgID int64 `xorm:"org_id"`
|
||||
ID int64 `xorm:"pk autoincr 'id'"`
|
||||
OrgID int64 `xorm:"org_id"`
|
||||
// Deprecated: use FolderUID instead
|
||||
FolderID int64 `xorm:"folder_id"`
|
||||
UID string `xorm:"uid"`
|
||||
Name string
|
||||
|
Loading…
Reference in New Issue
Block a user