mirror of
https://github.com/LingChair/LingChair-V0.git
synced 2025-12-07 17:45:49 +08:00
chore: 项目说明, feat: 添加好友(WIP), fix: 输入框无法置底
This commit is contained in:
@@ -148,6 +148,21 @@ let api = {
|
||||
cb({ msg: msg, code: 0, data: { friends: friends } })
|
||||
},
|
||||
|
||||
// 添加好友
|
||||
// {name: 账号, accessToken: 访问令牌} 返回 {friends: []}
|
||||
// WIP
|
||||
"user.addFriend": (a, cb) => {
|
||||
if (checkEmpty([a.name, a.accessToken]))
|
||||
return cb({ msg: "参数缺失", code: -1 })
|
||||
|
||||
let { msg, code, friends } = users.getFriends(a.name, a.accessToken)
|
||||
|
||||
if (code !== 0)
|
||||
return cb({ msg: msg, code: code })
|
||||
|
||||
cb({ msg: msg, code: 0, data: { friends: friends } })
|
||||
},
|
||||
|
||||
"user.getNick": (a, cb) => {
|
||||
if (checkEmpty([a.name]))
|
||||
return cb({ msg: "参数缺失", code: -1 })
|
||||
|
||||
Reference in New Issue
Block a user