mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 07:43:50 +02:00
refactor: Organize Project Structure (#1211)
* refactor: Organize Project Structure * fix * fix * rm security * fix
This commit is contained in:
41
src/api/inviteMessages.js
Normal file
41
src/api/inviteMessages.js
Normal file
@@ -0,0 +1,41 @@
|
||||
// #region | App: Invite Messages
|
||||
|
||||
const inviteMessagesReq = {
|
||||
refreshInviteMessageTableData(messageType) {
|
||||
return window.API.call(
|
||||
`message/${window.API.currentUser.id}/${messageType}`,
|
||||
{
|
||||
method: 'GET'
|
||||
}
|
||||
).then((json) => {
|
||||
const args = {
|
||||
json,
|
||||
messageType
|
||||
};
|
||||
window.API.$emit(`INVITE:${messageType.toUpperCase()}`, args);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
editInviteMessage(params, messageType, slot) {
|
||||
return window.API.call(
|
||||
`message/${window.API.currentUser.id}/${messageType}/${slot}`,
|
||||
{
|
||||
method: 'PUT',
|
||||
params
|
||||
}
|
||||
).then((json) => {
|
||||
const args = {
|
||||
json,
|
||||
params,
|
||||
messageType,
|
||||
slot
|
||||
};
|
||||
return args;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// #endregion
|
||||
|
||||
export default inviteMessagesReq;
|
||||
Reference in New Issue
Block a user