Skip to content

Commit

Permalink
OFMCC-364 - clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
vietle-cgi committed Nov 3, 2023
1 parent 51f9f46 commit 9957dae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
1 change: 0 additions & 1 deletion backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ apiRouter.use('/config', configRouter)
apiRouter.use('/messages', messageRouter)
apiRouter.use('/notifications', notificationRouter)

apiRouter.use('/message', messageRouter)
//TODO: Router from MyCCS only here for 1st backend iteration example. To be removed ...
apiRouter.use('/organization', organizationRouter)

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/messages/NewRequestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
import { mapState, mapActions } from 'pinia';
import { useAuthStore } from '@/stores/auth';
import { useAppStore } from '@/stores/app';
import { useMessageStore } from '@/stores/message';
import { useMessagesStore } from '@/stores/messages';
import AppButton from '../ui/AppButton.vue';
import AppDialog from '../ui/AppDialog.vue';
import rules from '@/utils/rules';
Expand Down Expand Up @@ -167,7 +167,7 @@ export default {
this.setUpDefaultNewRequestModel();
},
methods: {
...mapActions(useMessageStore, ['submitNewAssistanceRequest']),
...mapActions(useMessagesStore, ['submitNewAssistanceRequest']),
setUpDefaultNewRequestModel() {
this.newRequestModel = {
Expand Down
24 changes: 0 additions & 24 deletions frontend/src/stores/message.js

This file was deleted.

9 changes: 9 additions & 0 deletions frontend/src/stores/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,14 @@ export const useMessagesStore = defineStore('messages', {
console.log(error)
}
},
async submitNewAssistanceRequest(payload) {
try {
let response = await ApiService.apiAxios.post(ApiRoutes.MESSAGE + '/newAssistanceRequest', payload);
return response?.data;
} catch (error) {
console.log(`Failed to create a new Assistance Request - ${error}`);
throw error;
}
},
},
})
2 changes: 1 addition & 1 deletion frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const AuthRoutes = Object.freeze({

export const ApiRoutes = Object.freeze({
USER: baseRoot + '/user',
MESSAGE: baseRoot + '/messages',
LOOKUP: baseRoot + '/config/lookup',
MESSAGE: baseRoot + '/message',
NOTICE: baseRoot + '/notifications',
})

Expand Down

0 comments on commit 9957dae

Please sign in to comment.