diff --git a/packages/discord-bot/src/handlers/announce.ts b/packages/discord-bot/src/handlers/announce.ts index 83a62ebd3..f74cecc16 100644 --- a/packages/discord-bot/src/handlers/announce.ts +++ b/packages/discord-bot/src/handlers/announce.ts @@ -91,7 +91,7 @@ export const announcementHandler: CommandHandler = async ( const response = await apiGet( 'periods', { - headers: { host: host }, + headers: { host }, } ); periods = [...response.data.docs]; diff --git a/packages/discord-bot/src/handlers/leaderboard.ts b/packages/discord-bot/src/handlers/leaderboard.ts index bcfeb31f1..0ed1f6688 100644 --- a/packages/discord-bot/src/handlers/leaderboard.ts +++ b/packages/discord-bot/src/handlers/leaderboard.ts @@ -31,7 +31,7 @@ export const leaderboardHandler: CommandHandler = async ( const response = await apiClient.get( 'periods', { - headers: { host: host }, + headers: { host }, } ); periods = [...response.data.docs]; @@ -62,7 +62,7 @@ export const leaderboardHandler: CommandHandler = async ( const response = await apiClient.get( `periods/${latestClosedPeriod?._id}`, { - headers: { host: host }, + headers: { host }, } ); await interaction.editReply({ diff --git a/packages/discord-bot/src/handlers/whatsup.ts b/packages/discord-bot/src/handlers/whatsup.ts index b312279f5..3264e6c90 100644 --- a/packages/discord-bot/src/handlers/whatsup.ts +++ b/packages/discord-bot/src/handlers/whatsup.ts @@ -61,7 +61,7 @@ export const whatsupHandler: CommandHandler = async ( const praiseResponse = await apiGet( '/praise?limit=100&page=1&sortColumn=createdAt&sortType=desc', { - headers: { host: host }, + headers: { host }, } ); diff --git a/packages/discord-bot/src/handlers/whoami.ts b/packages/discord-bot/src/handlers/whoami.ts index dd134cafb..941304c42 100644 --- a/packages/discord-bot/src/handlers/whoami.ts +++ b/packages/discord-bot/src/handlers/whoami.ts @@ -50,7 +50,7 @@ export const whoamiHandler: CommandHandler = async ( const activatedAccounts = await apiClient .get(`useraccounts?user=${ua.user._id}`, { - headers: { host: host }, + headers: { host }, }) .then((res) => res.data); for (const account of activatedAccounts) { diff --git a/packages/discord-bot/src/handlers/whois.ts b/packages/discord-bot/src/handlers/whois.ts index fb9fd4cf0..50163d606 100644 --- a/packages/discord-bot/src/handlers/whois.ts +++ b/packages/discord-bot/src/handlers/whois.ts @@ -58,7 +58,7 @@ export const whoisHandler: CommandHandler = async ( const response = await apiClient.get( `/praise?limit=100&page=1&receiver=${userAccount._id}&sortType=desc&sortColumn=score`, { - headers: { host: host }, + headers: { host }, } ); @@ -79,7 +79,7 @@ export const whoisHandler: CommandHandler = async ( userAccount.user ? apiClient .get(`/users/${userAccount.user._id}`, { - headers: { host: host }, + headers: { host }, }) .then((res) => res.data) : Promise.resolve(null), diff --git a/packages/discord-bot/src/utils/dmTargets.ts b/packages/discord-bot/src/utils/dmTargets.ts index f92c98851..fb7ef5250 100644 --- a/packages/discord-bot/src/utils/dmTargets.ts +++ b/packages/discord-bot/src/utils/dmTargets.ts @@ -183,7 +183,8 @@ export const selectTargets = async ( try { const selectedPeriod = await apiGet( - `/periods/${period}` + `/periods/${period}`, + { headers: { host } } ).then((res) => res.data); logger.debug( diff --git a/packages/discord-bot/src/utils/getActivateToken.ts b/packages/discord-bot/src/utils/getActivateToken.ts index 15fa53b27..04dd69d64 100644 --- a/packages/discord-bot/src/utils/getActivateToken.ts +++ b/packages/discord-bot/src/utils/getActivateToken.ts @@ -18,7 +18,7 @@ export const getActivateToken = async ( `/useraccounts/${userAccount._id}`, ua, { - headers: { host: host }, + headers: { host }, } ) .then((res) => res.data) diff --git a/packages/discord-bot/src/utils/getUserAccount.ts b/packages/discord-bot/src/utils/getUserAccount.ts index b3e642cd5..6b694f9ff 100644 --- a/packages/discord-bot/src/utils/getUserAccount.ts +++ b/packages/discord-bot/src/utils/getUserAccount.ts @@ -22,7 +22,7 @@ const createUserAccount = async ( CreateUserAccountResponseDto, CreateUserAccountInputDto >('/useraccounts', newUserAccount, { - headers: { host: host }, + headers: { host }, }); return response.data; }; @@ -41,7 +41,7 @@ const updateUserAccount = async ( UpdateUserAccountResponseDto, UpdateUserAccountInputDto >(`/useraccounts/${ua._id}`, updatedUserAccount, { - headers: { host: host }, + headers: { host }, }); return response.data; } @@ -61,7 +61,7 @@ export const getUserAccount = async ( const data = await apiGet( `/useraccounts/?accountId=${user.id}`, { - headers: { host: host }, + headers: { host }, } ) .then((res) => res.data.filter((acc) => acc.platform === 'DISCORD')) diff --git a/praise-giveth-io-20230614071552.archive b/praise-giveth-io-20230614071552.archive new file mode 100644 index 000000000..77e2474f1 Binary files /dev/null and b/praise-giveth-io-20230614071552.archive differ