Remove unused code

This commit is contained in:
Taras Kushnir
2026-01-15 14:57:51 +02:00
parent 809a667bf9
commit 64ceb48321
4 changed files with 0 additions and 37 deletions

View File

@@ -1241,20 +1241,6 @@ func (impl *BusinessStoreImpl) GetCachedOrgInviteByID(ctx context.Context, invit
return FetchCachedOne[dbgen.OrganizationUser](ctx, impl.cache, orgInviteCacheKey(inviteID))
}
func (impl *BusinessStoreImpl) RetrieveOrgInviteByID(ctx context.Context, inviteID int32) (*dbgen.OrganizationUser, error) {
reader := &StoreOneReader[int32, dbgen.OrganizationUser]{
CacheKey: orgInviteCacheKey(inviteID),
Cache: impl.cache,
}
if impl.querier != nil {
reader.QueryFunc = impl.querier.GetOrgInviteByID
reader.QueryKeyFunc = QueryKeyInt
}
return reader.Read(ctx)
}
func (impl *BusinessStoreImpl) LinkOrgInviteToUser(ctx context.Context, inviteID int32, user *dbgen.User) error {
if impl.querier == nil {
return ErrMaintenance

View File

@@ -11,25 +11,6 @@ import (
"github.com/jackc/pgx/v5/pgtype"
)
const getOrgInviteByID = `-- name: GetOrgInviteByID :one
SELECT org_id, user_id, level, created_at, updated_at, id, email FROM backend.organization_users WHERE id = $1
`
func (q *Queries) GetOrgInviteByID(ctx context.Context, id int32) (*OrganizationUser, error) {
row := q.db.QueryRow(ctx, getOrgInviteByID, id)
var i OrganizationUser
err := row.Scan(
&i.OrgID,
&i.UserID,
&i.Level,
&i.CreatedAt,
&i.UpdatedAt,
&i.ID,
&i.Email,
)
return &i, err
}
const getOrganizationUsers = `-- name: GetOrganizationUsers :many
SELECT u.id, u.name, u.email, u.subscription_id, u.created_at, u.updated_at, u.deleted_at, ou.level
FROM backend.organization_users ou

View File

@@ -46,7 +46,6 @@ type Querier interface {
GetLock(ctx context.Context, name string) (*Lock, error)
GetNotificationTemplateByHash(ctx context.Context, externalID string) (*NotificationTemplate, error)
GetOrgAuditLogs(ctx context.Context, arg *GetOrgAuditLogsParams) ([]*GetOrgAuditLogsRow, error)
GetOrgInviteByID(ctx context.Context, id int32) (*OrganizationUser, error)
GetOrgProperties(ctx context.Context, arg *GetOrgPropertiesParams) ([]*Property, error)
GetOrgPropertiesCount(ctx context.Context, orgID pgtype.Int4) (int64, error)
GetOrgPropertyByName(ctx context.Context, arg *GetOrgPropertyByNameParams) (*Property, error)

View File

@@ -16,9 +16,6 @@ INSERT INTO backend.organization_users (org_id, user_id, level) VALUES ($1, $2,
-- name: InviteEmailToOrg :one
INSERT INTO backend.organization_users (org_id, email, level) VALUES ($1, $2, 'invited') RETURNING *;
-- name: GetOrgInviteByID :one
SELECT * FROM backend.organization_users WHERE id = $1;
-- name: LinkOrgInviteToUser :one
UPDATE backend.organization_users
SET user_id = $1, email = NULL, updated_at = NOW()