feat: クライアントでログインするアカウントidを指定するクエリ(loginId=:userId) (#7929)
* feat: ログインするアカウントのIDをクエリ文字列で指定する機能 * await? * rename
This commit is contained in:
parent
fc65190ef7
commit
303c5abfb4
2 changed files with 32 additions and 0 deletions
11
src/client/scripts/login-id.ts
Normal file
11
src/client/scripts/login-id.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export function getUrlWithLoginId(url: string, loginId: string) {
|
||||
const u = new URL(url, origin);
|
||||
u.searchParams.append('loginId', loginId);
|
||||
return u.toString();
|
||||
}
|
||||
|
||||
export function getUrlWithoutLoginId(url: string) {
|
||||
const u = new URL(url);
|
||||
u.searchParams.delete('loginId');
|
||||
return u.toString();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue