Fix imports of authorized function

This commit is contained in:
Jackson Harper 2024-01-21 13:33:05 +08:00
parent 56a8ef23b6
commit 5393743c9d
17 changed files with 17 additions and 17 deletions

View file

@ -17,7 +17,7 @@ import { getRepository } from '../../repository'
import { findApiKeys } from '../../services/api_key'
import { analytics } from '../../utils/analytics'
import { generateApiKey, hashApiKey } from '../../utils/auth'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const apiKeysResolver = authorized<ApiKeysSuccess, ApiKeysError>(
async (_, __, { log, uid }) => {

View file

@ -9,7 +9,7 @@ import {
optInFeature,
signFeatureToken,
} from '../../services/features'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const optInFeatureResolver = authorized<
OptInFeatureSuccess,

View file

@ -25,7 +25,7 @@ import {
} from '../../generated/graphql'
import { authTrx } from '../../repository'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const saveFilterResolver = authorized<
SaveFilterSuccess,

View file

@ -9,7 +9,7 @@ import {
} from '../../generated/graphql'
import { userRepository } from '../../repository/user'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
import { logger } from '../../utils/logger'
import {
countOfFilesWithPrefix,

View file

@ -37,7 +37,7 @@ import {
enqueueExportToIntegration,
enqueueImportFromIntegration,
} from '../../utils/createTask'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const setIntegrationResolver = authorized<
SetIntegrationSuccess,

View file

@ -37,7 +37,7 @@ import {
updateLabel,
} from '../../services/labels'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const labelsResolver = authorized<LabelsSuccess, LabelsError>(
async (_obj, _params, { authTrx, log, uid }) => {

View file

@ -8,7 +8,7 @@ import {
} from '../../generated/graphql'
import { updateLibraryItem } from '../../services/library_item'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
// export const updateLinkShareInfoResolver = authorized<
// UpdateLinkShareInfoSuccess,

View file

@ -30,7 +30,7 @@ import {
import { unsubscribeAll } from '../../services/subscriptions'
import { Merge } from '../../util'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export type CreateNewsletterEmailSuccessPartial = Merge<
CreateNewsletterEmailSuccess,

View file

@ -5,7 +5,7 @@ import {
MutationAddPopularReadArgs,
} from '../../generated/graphql'
import { addPopularRead } from '../../services/popular_reads'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const addPopularReadResolver = authorized<
AddPopularReadSuccess,
AddPopularReadError,

View file

@ -13,7 +13,7 @@ import {
} from '../../generated/graphql'
import { updateReceivedEmail } from '../../services/received_emails'
import { saveNewsletter } from '../../services/save_newsletter_email'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
import { generateUniqueUrl, parseEmailAddress } from '../../utils/parser'
import { sendEmail } from '../../utils/sendEmail'

View file

@ -3,7 +3,7 @@ import {
RecentSearchesSuccess,
} from '../../generated/graphql'
import { getRecentSearches } from '../../services/search_history'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const recentSearchesResolver = authorized<
RecentSearchesSuccess,

View file

@ -14,7 +14,7 @@ import {
SetRuleSuccess,
} from '../../generated/graphql'
import { deleteRule } from '../../services/rules'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const setRuleResolver = authorized<
SetRuleSuccess,

View file

@ -12,7 +12,7 @@ import { saveFile } from '../../services/save_file'
import { savePage } from '../../services/save_page'
import { saveUrl } from '../../services/save_url'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const savePageResolver = authorized<
SaveSuccess,

View file

@ -5,7 +5,7 @@ import {
SendInstallInstructionsSuccess,
} from '../../generated/graphql'
import { userRepository } from '../../repository/user'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
import { sendEmail } from '../../utils/sendEmail'
const INSTALL_INSTRUCTIONS_EMAIL_TEMPLATE_ID =

View file

@ -20,7 +20,7 @@ import {
findDeviceTokensByUserId,
} from '../../services/user_device_tokens'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
const PG_UNIQUE_CONSTRAINT_VIOLATION = '23505'

View file

@ -8,7 +8,7 @@ import {
SetUserPersonalizationSuccess,
SortOrder,
} from '../../generated/graphql'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const setUserPersonalizationResolver = authorized<
SetUserPersonalizationSuccess,

View file

@ -22,7 +22,7 @@ import {
import { authTrx } from '../../repository'
import { deleteWebhook } from '../../services/webhook'
import { analytics } from '../../utils/analytics'
import { authorized } from '../../utils/helpers'
import { authorized } from '../../utils/gql-utils'
export const webhooksResolver = authorized<WebhooksSuccess, WebhooksError>(
async (_obj, _params, { uid, log }) => {