Update auth.js
This commit is contained in:
1 parent
6eb1673653
commit
4594a9acf3
1 file changed
+12
+12
@@ -1,3 +1,15 @@
|
|||||||
|
// ============================================================
|
||||||
|
// AUTH 对象(供其他模块使用)
|
||||||
|
// ============================================================
|
||||||
|
|
||||||
|
const AUTH = {
|
||||||
|
async getUserProfile(userId) {
|
||||||
|
const data = await apiFetch('/users/' + userId);
|
||||||
|
if (data.error) throw new Error(data.error);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// 🔐 认证
|
// 🔐 认证
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|||||||
Reference in new issue
Block a user