feat: add access key and secret key for user (#1971)

This commit is contained in:
XDTD
2023-06-13 22:18:17 +08:00
committed by GitHub
parent 805cf20d04
commit 967fa4be68
9 changed files with 157 additions and 3 deletions

View File

@ -45,6 +45,17 @@ export function getUser(owner, name) {
}).then(res => res.json());
}
export function addUserKeys(user) {
return fetch(`${Setting.ServerUrl}/api/add-user-keys`, {
method: "POST",
credentials: "include",
body: JSON.stringify(user),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}
export function updateUser(owner, name, user) {
const newUser = Setting.deepCopy(user);
return fetch(`${Setting.ServerUrl}/api/update-user?id=${owner}/${encodeURIComponent(name)}`, {