Skip to content

Commit

Permalink
fixup! Combine itineraries and schema calls in getBody call
Browse files Browse the repository at this point in the history
  • Loading branch information
gfaudriga committed Apr 9, 2024
1 parent 97dbdc0 commit 6060444
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
'verb' => 'GET'
],
[
// TODO: If removing this ajax call is ok, remove this route.
'name' => 'messages#getItineraries',
'url' => '/api/messages/{id}/itineraries',
'verb' => 'GET'
Expand Down
1 change: 1 addition & 0 deletions lib/Controller/MessagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public function getBody(int $id): JSONResponse {
*/
#[TrapError]
public function getItineraries(int $id): JSONResponse {
// TODO: If removing this ajax call is ok, remove this method.
if ($this->config->getAppValue('mail', 'markup_library_used_for_extraction', 'h2ld') !== 'kitinerary') {
return new JSONResponse([], Http::STATUS_NOT_ACCEPTABLE);
}
Expand Down
1 change: 1 addition & 0 deletions src/service/MessageService.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export async function fetchMessage(id) {
}

export async function fetchMessageItineraries(id) {
// TODO: If removing this ajax call is ok, remove this method.
const url = generateUrl('/apps/mail/api/messages/{id}/itineraries', {
id,
})
Expand Down
1 change: 1 addition & 0 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ export default {
})
},
async fetchItineraries({ commit }, id) {
// TODO: If removing this ajax call is ok, remove this method.
return handleHttpAuthErrors(commit, async () => {
const itineraries = await fetchMessageItineraries(id)
commit('addMessageItineraries', {
Expand Down

0 comments on commit 6060444

Please sign in to comment.