mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: achievement section for user not logged in
This commit is contained in:
parent
a064958d4c
commit
a4475d2145
7 changed files with 131 additions and 19 deletions
|
|
@ -4,6 +4,7 @@ import {
|
|||
} from "@main/repository";
|
||||
import { HydraApi } from "../hydra-api";
|
||||
import { AchievementData } from "@types";
|
||||
import { UserNotLoggedInError } from "@shared";
|
||||
|
||||
export const getGameAchievementData = async (
|
||||
objectId: string,
|
||||
|
|
@ -30,7 +31,11 @@ export const getGameAchievementData = async (
|
|||
|
||||
return achievements;
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((err) => {
|
||||
if (err instanceof UserNotLoggedInError) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
return gameAchievementRepository
|
||||
.findOne({
|
||||
where: { objectId, shop },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue