refactor (backend): remove misc/langmap.ts
This commit is contained in:
parent
1b143ebfaa
commit
53dfec57a8
7 changed files with 8 additions and 11 deletions
|
@ -1,4 +0,0 @@
|
|||
import { langmap as _langmap } from "firefish-js";
|
||||
export const langmap = _langmap;
|
||||
|
||||
export type PostLanguage = keyof typeof langmap;
|
|
@ -52,7 +52,7 @@ import { UserProfiles } from "@/models/index.js";
|
|||
import { In } from "typeorm";
|
||||
import { config } from "@/config.js";
|
||||
import { truncate } from "@/misc/truncate.js";
|
||||
import { langmap } from "@/misc/langmap.js";
|
||||
import { langmap } from "firefish-js";
|
||||
import { inspect } from "node:util";
|
||||
|
||||
export function validateNote(object: any, uri: string) {
|
||||
|
|
|
@ -17,7 +17,7 @@ import { ApiError } from "@/server/api/error.js";
|
|||
import define from "@/server/api/define.js";
|
||||
import { HOUR } from "backend-rs";
|
||||
import { getNote } from "@/server/api/common/getters.js";
|
||||
import { langmap } from "@/misc/langmap.js";
|
||||
import { langmap } from "firefish-js";
|
||||
|
||||
export const meta = {
|
||||
tags: ["notes"],
|
||||
|
|
|
@ -34,7 +34,7 @@ import renderNote from "@/remote/activitypub/renderer/note.js";
|
|||
import renderUpdate from "@/remote/activitypub/renderer/update.js";
|
||||
import { deliverToRelays } from "@/services/relay.js";
|
||||
// import { deliverQuestionUpdate } from "@/services/note/polls/update.js";
|
||||
import { langmap } from "@/misc/langmap.js";
|
||||
import { langmap } from "firefish-js";
|
||||
|
||||
export const meta = {
|
||||
tags: ["notes"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ApiError } from "@/server/api/error.js";
|
||||
import { getNote } from "@/server/api/common/getters.js";
|
||||
import { translate } from "@/misc/translate.js";
|
||||
import type { PostLanguage } from "@/misc/langmap.js";
|
||||
import type { PostLanguage } from "firefish-js";
|
||||
import define from "@/server/api/define.js";
|
||||
|
||||
export const meta = {
|
||||
|
|
|
@ -63,7 +63,7 @@ import { db } from "@/db/postgre.js";
|
|||
import { getActiveWebhooks } from "@/misc/webhook-cache.js";
|
||||
import { redisClient } from "@/db/redis.js";
|
||||
import { Mutex } from "redis-semaphore";
|
||||
import { langmap } from "@/misc/langmap.js";
|
||||
import { langmap } from "firefish-js";
|
||||
import Logger from "@/services/logger.js";
|
||||
import { inspect } from "node:util";
|
||||
import { undefinedToNull } from "@/prelude/undefined-to-null.js";
|
||||
|
|
|
@ -31,11 +31,12 @@ export const languages = consts.languages;
|
|||
export const ffVisibility = consts.ffVisibility;
|
||||
export const instanceSortParam = consts.instanceSortParam;
|
||||
|
||||
import { langmap } from "./misc/langmap.js";
|
||||
import { langmap, type PostLanguage } from "./misc/langmap.js";
|
||||
export { langmap, type PostLanguage };
|
||||
|
||||
// api extractor not supported yet
|
||||
//export * as api from './api';
|
||||
//export * as entities from './entities';
|
||||
import * as api from "./api.js";
|
||||
import * as entities from "./entities.js";
|
||||
export { api, entities, langmap };
|
||||
export { api, entities };
|
||||
|
|
Loading…
Reference in a new issue