feat: ログインするアカウントのIDをクエリ文字列で指定する機能

This commit is contained in:
tamaina
2021-10-29 00:55:07 +09:00
parent fa0814f939
commit 4f7ae81d5f
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
export function appendLoginId(url: string, loginId: string) {
const u = new URL(url, origin);
u.searchParams.append('loginId', loginId);
return u.toString();
}
export function deleteLoginId(url: string) {
const u = new URL(url);
u.searchParams.delete('loginId');
return u.toString();
}