Remove unnecessary function exports
This commit is contained in:
@@ -10,7 +10,7 @@ import { APP_METADATA_KEY_PREFIX, METADATA_MIGRATIONS } from '@/modules/metadata
|
|||||||
import { IMetadataMigration, Metadata } from '@/modules/metadata/Metadata.types.ts';
|
import { IMetadataMigration, Metadata } from '@/modules/metadata/Metadata.types.ts';
|
||||||
import { doesMetadataKeyExistIn, getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
import { doesMetadataKeyExistIn, getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
||||||
|
|
||||||
export const getAppKeyPrefixForMigration = (migrationId: number): string => {
|
const getAppKeyPrefixForMigration = (migrationId: number): string => {
|
||||||
const appKeyPrefix = METADATA_MIGRATIONS.slice(0, migrationId)
|
const appKeyPrefix = METADATA_MIGRATIONS.slice(0, migrationId)
|
||||||
.reverse()
|
.reverse()
|
||||||
.find((migration) => !!migration.appKeyPrefix);
|
.find((migration) => !!migration.appKeyPrefix);
|
||||||
@@ -34,7 +34,7 @@ const getAppMetadataFrom = (
|
|||||||
return appMetadata;
|
return appMetadata;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const applyAppKeyPrefixMigration = (meta: Metadata, migration: IMetadataMigration): Metadata => {
|
const applyAppKeyPrefixMigration = (meta: Metadata, migration: IMetadataMigration): Metadata => {
|
||||||
const migratedMetadata: Metadata = { ...meta };
|
const migratedMetadata: Metadata = { ...meta };
|
||||||
|
|
||||||
if (!migration.appKeyPrefix) {
|
if (!migration.appKeyPrefix) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import { CategoryIdInfo } from '@/modules/category/Category.types.ts';
|
|||||||
import { SourceType } from '@/lib/graphql/generated/graphql.ts';
|
import { SourceType } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { doesMetadataKeyExistIn, extractOriginalKey, getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
import { doesMetadataKeyExistIn, extractOriginalKey, getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
||||||
|
|
||||||
export const getMetadataValueFrom = <Key extends AppMetadataKeys, Value extends AllowedMetadataValueTypes>(
|
const getMetadataValueFrom = <Key extends AppMetadataKeys, Value extends AllowedMetadataValueTypes>(
|
||||||
{ meta }: MetadataHolder,
|
{ meta }: MetadataHolder,
|
||||||
key: Key,
|
key: Key,
|
||||||
defaultValue?: Value,
|
defaultValue?: Value,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
import { MangaIdInfo } from '@/modules/manga/Manga.types.ts';
|
import { MangaIdInfo } from '@/modules/manga/Manga.types.ts';
|
||||||
import { getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
import { getMetadataKey } from '@/modules/metadata/Metadata.utils.ts';
|
||||||
|
|
||||||
export const requestUpdateMetadataValue = async (
|
const requestUpdateMetadataValue = async (
|
||||||
metadataHolder: GqlMetaHolder,
|
metadataHolder: GqlMetaHolder,
|
||||||
holderType: MetadataHolderType,
|
holderType: MetadataHolderType,
|
||||||
key: AppMetadataKeys,
|
key: AppMetadataKeys,
|
||||||
@@ -51,7 +51,7 @@ export const requestUpdateMetadataValue = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const requestUpdateMetadata = async (
|
const requestUpdateMetadata = async (
|
||||||
metadataHolder: GqlMetaHolder,
|
metadataHolder: GqlMetaHolder,
|
||||||
holderType: MetadataHolderType,
|
holderType: MetadataHolderType,
|
||||||
keysToValues: MetadataKeyValuePair[],
|
keysToValues: MetadataKeyValuePair[],
|
||||||
@@ -121,7 +121,7 @@ export const requestDeleteMetadataValue = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function requestDeleteMetadata(
|
async function requestDeleteMetadata(
|
||||||
metadataHolder: GqlMetaHolder,
|
metadataHolder: GqlMetaHolder,
|
||||||
holderType: MetadataHolderType,
|
holderType: MetadataHolderType,
|
||||||
keys: AppMetadataKeys[],
|
keys: AppMetadataKeys[],
|
||||||
|
|||||||
Reference in New Issue
Block a user