Rename Id to ID for annotation models (#62886)

* Rename Id to ID for annotation models

* Add xorm tags

* Rename Id to ID for API key models

* Add xorm tags
This commit is contained in:
idafurjes
2023-02-03 17:23:09 +01:00
committed by GitHub
parent a0602a2a78
commit 982939111b
34 changed files with 367 additions and 367 deletions
+4 -4
View File
@@ -595,8 +595,8 @@ func TestAPI_Annotations_AccessControl(t *testing.T) {
server := SetupAPITestServer(t, func(hs *HTTPServer) {
hs.Cfg = setting.NewCfg()
repo := annotationstest.NewFakeAnnotationsRepo()
_ = repo.Save(context.Background(), &annotations.Item{Id: 1, DashboardId: 0})
_ = repo.Save(context.Background(), &annotations.Item{Id: 2, DashboardId: 1})
_ = repo.Save(context.Background(), &annotations.Item{ID: 1, DashboardID: 0})
_ = repo.Save(context.Background(), &annotations.Item{ID: 2, DashboardID: 1})
hs.annotationsRepo = repo
hs.AccessControl = acimpl.ProvideAccessControl(hs.Cfg)
hs.AccessControl.RegisterScopeAttributeResolver(AnnotationTypeScopeResolver(hs.annotationsRepo))
@@ -649,8 +649,8 @@ func TestService_AnnotationTypeScopeResolver(t *testing.T) {
},
}
dashboardAnnotation := annotations.Item{Id: 1, DashboardId: 1}
organizationAnnotation := annotations.Item{Id: 2}
dashboardAnnotation := annotations.Item{ID: 1, DashboardID: 1}
organizationAnnotation := annotations.Item{ID: 2}
fakeAnnoRepo := annotationstest.NewFakeAnnotationsRepo()
_ = fakeAnnoRepo.Save(context.Background(), &dashboardAnnotation)