2019-08-14 09:48:44 +00:00
|
|
|
/* eslint arrow-body-style: ["error", "always"] */
|
|
|
|
|
|
|
|
const endPoints = {
|
|
|
|
resetPassword: {
|
|
|
|
url: 'auth/password',
|
|
|
|
},
|
|
|
|
register: {
|
|
|
|
url: 'api/v1/accounts.json',
|
|
|
|
},
|
|
|
|
validityCheck: {
|
|
|
|
url: '/auth/validate_token',
|
|
|
|
},
|
2020-02-16 11:50:38 +00:00
|
|
|
profileUpdate: {
|
|
|
|
url: '/api/v1/profile',
|
|
|
|
},
|
2021-10-07 07:51:46 +00:00
|
|
|
availabilityUpdate: {
|
|
|
|
url: '/api/v1/profile/availability',
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
logout: {
|
|
|
|
url: 'auth/sign_out',
|
|
|
|
},
|
2019-10-27 13:31:59 +00:00
|
|
|
|
2019-08-14 09:48:44 +00:00
|
|
|
me: {
|
|
|
|
url: 'api/v1/conversations.json',
|
|
|
|
params: { type: 0, page: 1 },
|
|
|
|
},
|
|
|
|
|
|
|
|
getInbox: {
|
|
|
|
url: 'api/v1/conversations.json',
|
|
|
|
params: { inbox_id: null },
|
|
|
|
},
|
|
|
|
|
|
|
|
fetchFacebookPages: {
|
2020-03-28 06:13:02 +00:00
|
|
|
url(accountId) {
|
|
|
|
return `api/v1/accounts/${accountId}/callbacks/facebook_pages.json`;
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
params: { omniauth_token: '' },
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2019-08-21 07:29:56 +00:00
|
|
|
export default page => {
|
2019-08-14 09:48:44 +00:00
|
|
|
return endPoints[page];
|
|
|
|
};
|