mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19:10 +00:00
fix(api): sync from legacy used wrong type of data
This commit is contained in:
parent
bfc96b0750
commit
117c73a8a1
2 changed files with 9 additions and 6 deletions
|
@ -44,11 +44,13 @@ export const transformLegacyGuild = (guild: LegacyGuildData): GuildData => {
|
||||||
id: guild.id,
|
id: guild.id,
|
||||||
message: guild.message,
|
message: guild.message,
|
||||||
features: Features.LegacyGuild,
|
features: Features.LegacyGuild,
|
||||||
categories: sortBy(guild.categories, 'position').map((category, idx) => ({
|
categories: sortBy(Object.values(guild.categories), 'position').map(
|
||||||
|
(category, idx) => ({
|
||||||
...category,
|
...category,
|
||||||
id: KSUID.randomSync().string,
|
id: KSUID.randomSync().string,
|
||||||
position: idx, // Reset positions by index. May have side-effects but oh well.
|
position: idx, // Reset positions by index. May have side-effects but oh well.
|
||||||
type: category.type === 'multi' ? CategoryType.Multi : CategoryType.Single,
|
type: category.type === 'multi' ? CategoryType.Multi : CategoryType.Single,
|
||||||
})),
|
})
|
||||||
|
),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,6 +7,7 @@ module.exports = {
|
||||||
'BOT_CLIENT_ID',
|
'BOT_CLIENT_ID',
|
||||||
'BOT_CLIENT_SECRET',
|
'BOT_CLIENT_SECRET',
|
||||||
'BOT_TOKEN',
|
'BOT_TOKEN',
|
||||||
|
'BOT_IMPORT_TOKEN',
|
||||||
'UI_PUBLIC_URI',
|
'UI_PUBLIC_URI',
|
||||||
'API_PUBLIC_URI',
|
'API_PUBLIC_URI',
|
||||||
'ROOT_USERS',
|
'ROOT_USERS',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue