mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: removing unaudited resources (#5885)
* chore: removing unaudited resources * cleaned up tests * CI errors
This commit is contained in:
@@ -9,8 +9,6 @@ import (
|
||||
// AuditableResources, then add it to this interface.
|
||||
type Auditable interface {
|
||||
database.APIKey |
|
||||
database.Organization |
|
||||
database.OrganizationMember |
|
||||
database.Template |
|
||||
database.TemplateVersion |
|
||||
database.User |
|
||||
|
||||
@@ -49,8 +49,6 @@ type BuildAuditParams[T Auditable] struct {
|
||||
|
||||
func ResourceTarget[T Auditable](tgt T) string {
|
||||
switch typed := any(tgt).(type) {
|
||||
case database.Organization:
|
||||
return typed.Name
|
||||
case database.Template:
|
||||
return typed.Name
|
||||
case database.TemplateVersion:
|
||||
@@ -73,8 +71,6 @@ func ResourceTarget[T Auditable](tgt T) string {
|
||||
|
||||
func ResourceID[T Auditable](tgt T) uuid.UUID {
|
||||
switch typed := any(tgt).(type) {
|
||||
case database.Organization:
|
||||
return typed.ID
|
||||
case database.Template:
|
||||
return typed.ID
|
||||
case database.TemplateVersion:
|
||||
@@ -96,8 +92,6 @@ func ResourceID[T Auditable](tgt T) uuid.UUID {
|
||||
|
||||
func ResourceType[T Auditable](tgt T) database.ResourceType {
|
||||
switch any(tgt).(type) {
|
||||
case database.Organization:
|
||||
return database.ResourceTypeOrganization
|
||||
case database.Template:
|
||||
return database.ResourceTypeTemplate
|
||||
case database.TemplateVersion:
|
||||
|
||||
Reference in New Issue
Block a user