From b74d4e0469bc969513614294bcc6f4d3516b6b89 Mon Sep 17 00:00:00 2001 From: ihsangan Date: Wed, 30 Oct 2024 20:21:00 +0800 Subject: [PATCH] fix pb: always return success 200 --- src/router/pb.ts | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) mode change 100755 => 100644 src/router/pb.ts diff --git a/src/router/pb.ts b/src/router/pb.ts old mode 100755 new mode 100644 index 9ecc181..d0867c8 --- a/src/router/pb.ts +++ b/src/router/pb.ts @@ -8,10 +8,18 @@ export default async function pb(id: string): Promise { body }); const data = await response.json(); - return { - success: true, - game: 'Point Blank', - id, - name: data.confirmationFields.username - }; + if (data.confirmationFields.username) { + return { + success: true, + game: 'Point Blank', + id, + name: data.confirmationFields.username + }; + } + else { + return { + success: false, + message: 'Not found' + } + } } \ No newline at end of file