link api front
This commit is contained in:
@@ -2,28 +2,27 @@ import API from "./API";
|
||||
|
||||
export default {
|
||||
registerAccount(data: object) {
|
||||
return API().post("/mail/account", data);
|
||||
return API().post("/account/register", data);
|
||||
},
|
||||
getAccounts() {
|
||||
return API().get("/mail/accounts");
|
||||
return API().get("/account/getAll");
|
||||
},
|
||||
getRooms(mailboxId: number) {
|
||||
return API().get(`/mail/${mailboxId}/rooms`);
|
||||
return API().get(`/account/${mailboxId}/rooms`);
|
||||
},
|
||||
getMessages(roomId: number) {
|
||||
return API().get(`/mail/${roomId}/messages`);
|
||||
return API().get(`/room/${roomId}/messages`);
|
||||
},
|
||||
getMembers(roomId: number) {
|
||||
return API().get(`/mail/${roomId}/members`);
|
||||
return API().get(`/room/${roomId}/members`);
|
||||
},
|
||||
addFlag(data: { mailboxId: number; messageId: number; flag: string }) {
|
||||
return API().post(`/mail/addFlag`, data);
|
||||
return API().post(`/message/addFlag`, data);
|
||||
},
|
||||
removeFlag(data: { mailboxId: number; messageId: number; flag: string }) {
|
||||
return API().post(`/mail/removeFlag`, data);
|
||||
return API().post(`/message/removeFlag`, data);
|
||||
},
|
||||
reponseEmail(data: { user: string; roomId: number; text: string; html: string }) {
|
||||
console.log(data);
|
||||
return API().post(`/mail/response`, data);
|
||||
return API().post(`/room/response`, data);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user