reviewing pull request 🇯🇲

This commit is contained in:
Will Holcomb
2021-07-18 08:48:04 -04:00
committed by dan13ram
parent 2601b12476
commit ce4d42b6d2
4 changed files with 12 additions and 28 deletions

View File

@@ -9,19 +9,11 @@ export default async (req: Request, res: Response): Promise<void> => {
const playerId = req.body.input?.playerId;
if (!['admin', 'player'].includes(role)) {
res.json({
success: false,
error: `Expected Role: admin or player. Got "${role}".`,
});
return;
throw new Error(`Expected Role: admin or player. Got "${role}".`);
}
if (!playerId) {
res.json({
success: false,
error: 'No playerId specified to update.',
});
return;
throw new Error('No playerId specified to update.');
}
if (!req.app.locals.queuedRecacheFor[playerId]) {
@@ -37,6 +29,6 @@ export default async (req: Request, res: Response): Promise<void> => {
);
res.json({ success: true });
} else {
res.json({ success: false, error: 'Already queued to be refreshed.' });
throw new Error('Already queued to be refreshed.');
}
};

View File

@@ -22,14 +22,6 @@ export const GetPlayerFromEth = gql`
}
`;
export const GetPlayerIds = gql`
query GetPlayerIds($limit: Int) {
player(limit: $limit) {
id
}
}
`;
export const GetQuestById = gql`
query GetQuestById($quest_id: uuid!) {
quest_by_pk(id: $quest_id) {

View File

@@ -47,7 +47,7 @@ export const useOpenSeaCollectibles = ({
if (collectiblesFavorites.length > 0 && owner) {
const favoritesQuery = {
owner,
token_ids: collectiblesFavorites.map(({ tokenId }) => tokenId ?? ''),
token_ids: collectiblesFavorites.map(({ tokenId }) => tokenId || ''),
};
const [favoritesData, allData] = await Promise.all([
fetchOpenSeaData(favoritesQuery),

View File

@@ -9199,7 +9199,7 @@ borc@^2.1.2:
json-text-sequence "~0.1.0"
readable-stream "^3.6.0"
bottleneck@^2.19.5:
bottleneck@2.19.5, bottleneck@^2.19.5:
version "2.19.5"
resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91"
integrity sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==
@@ -14737,6 +14737,13 @@ graphql-tag@2.12.4:
dependencies:
tslib "^2.1.0"
graphql-tag@2.12.5:
version "2.12.5"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.5.tgz#5cff974a67b417747d05c8d9f5f3cb4495d0db8f"
integrity sha512-5xNhP4063d16Pz3HBtKprutsPrmHZi5IdUGOWRxA2B6VF7BIRGOHZ5WQvDmJXZuPcBg7rYwaFxvQYjqkSdR3TQ==
dependencies:
tslib "^2.1.0"
graphql-tag@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd"
@@ -14749,13 +14756,6 @@ graphql-tag@^2.12.0:
dependencies:
tslib "^2.1.0"
graphql-tag@^2.12.5:
version "2.12.5"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.5.tgz#5cff974a67b417747d05c8d9f5f3cb4495d0db8f"
integrity sha512-5xNhP4063d16Pz3HBtKprutsPrmHZi5IdUGOWRxA2B6VF7BIRGOHZ5WQvDmJXZuPcBg7rYwaFxvQYjqkSdR3TQ==
dependencies:
tslib "^2.1.0"
graphql-tools@7.0.4:
version "7.0.4"
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-7.0.4.tgz#2ab8ee2afe1eb066f79fe8d0d643822d119d4ae3"