Skip to content

Commit

Permalink
Parse encoded SHLink returned on create
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrgn committed Feb 3, 2025
1 parent 001599e commit 836ac08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/utils/managementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export class SHLClient {
},
body: JSON.stringify(config)
});
const shl = await res.json();
const shlink = await res.json();
const payload = shlink.split('/');
const shl: SHLAdminParams = JSON.parse(base64url.decode(payload[payload.length - 1]).toString());
return shl;
}

Expand Down

0 comments on commit 836ac08

Please sign in to comment.