mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Add chat box
This commit is contained in:
@ -24,6 +24,16 @@ export function getMessages(owner, page = "", pageSize = "", field = "", value =
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getChatMessages(chat) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-messages?chat=${chat}`, {
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Accept-Language": Setting.getAcceptLanguage(),
|
||||
},
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getMessage(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-message?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
|
Reference in New Issue
Block a user