diff --git a/src/lib/db/lang.ts b/src/lib/db/lang.ts index 7ecbf1c..8b0a4a5 100644 --- a/src/lib/db/lang.ts +++ b/src/lib/db/lang.ts @@ -3,11 +3,11 @@ import { Lang } from "./mongodb"; export const getLang = async (language = "en") => { const lang = await Lang(language); return { - general: await lang[0].find({}).toArray(), - buildings: await lang[1].find({}).toArray(), - ships: await lang[2].find({}).toArray(), - resources: await lang[3].find({}).toArray(), - research: await lang[4].find({}).toArray(), - structures: await lang[5].find({}).toArray() + general: (await lang[0].find({}).toArray()).map(({ _id, ...rest }) => rest), + buildings: (await lang[1].find({}).toArray()).map(({ _id, ...rest }) => rest), + ships: (await lang[2].find({}).toArray()).map(({ _id, ...rest }) => rest), + resources: (await lang[3].find({}).toArray()).map(({ _id, ...rest }) => rest), + research: (await lang[4].find({}).toArray()).map(({ _id, ...rest }) => rest), + structures: (await lang[5].find({}).toArray()).map(({ _id, ...rest }) => rest) } } \ No newline at end of file