Files
VRCX/src/api/inviteMessages.js
pa 6bda44be52 refactor: Organize Project Structure (#1211)
* refactor: Organize Project Structure

* fix

* fix

* rm security

* fix
2025-04-18 16:04:03 +10:00

42 lines
1009 B
JavaScript

// #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;