Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions frontend/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios, {AxiosError} from 'axios';
import {apiURL} from '@/env';
import {getLocalToken, removeLocalToken} from '@/utils';
import axios, { AxiosError } from 'axios';
import { apiURL } from '@/env';
import { getLocalToken, removeLocalToken } from '@/utils';
import Vue from 'vue';

import {
Expand Down Expand Up @@ -49,13 +49,13 @@ import {
TestTemplateExecutionResultDTO,
TokenAndPasswordVM,
UpdateMeDTO,
UserDTO,
UserDTO
} from './generated-sources';
import {TYPE} from 'vue-toastification';
import { TYPE } from 'vue-toastification';
import ErrorToast from '@/views/main/utils/ErrorToast.vue';
import router from '@/router';
import mixpanel from 'mixpanel-browser';
import {useUserStore} from '@/stores/user';
import { useUserStore } from '@/stores/user';

function jwtRequestInterceptor(config) {
// Do something before request is sent
Expand Down Expand Up @@ -448,7 +448,7 @@ export const api = {
async replyToFeedback(feedbackId: number, content: string, replyToId: number | null = null) {
return apiV2.post<unknown, void>(`/feedbacks/${feedbackId}/reply`, <CreateFeedbackReplyDTO>{
content,
replyToReply: replyToId,
replyToReply: replyToId
});
},
async deleteFeedback(id: number) {
Expand All @@ -457,18 +457,18 @@ export const api = {
async deleteFeedbackReply(feedbackId: number, replyId: number) {
return apiV2.delete<unknown, void>(`/feedbacks/${feedbackId}/replies/${replyId}`);
},
async runAdHocTest(projectId: number, testUuid: string, inputs: Array<FunctionInputDTO>) {
return apiV2.post<unknown, TestTemplateExecutionResultDTO>(`/testing/tests/run-test`, {
async runAdHocTest(projectId: number, testUuid: string, inputs: Array<FunctionInputDTO>, sample: boolean) {
return apiV2.post<unknown, TestTemplateExecutionResultDTO>(`/testing/tests/run-test?sample=${sample}`, {
projectId,
testUuid,
inputs,
inputs
});
},
async getCatalog(projectId: number) {
return apiV2.get<unknown, CatalogDTO>(`/catalog`, {
params: {
projectId,
},
projectId
}
});
},
Comment on lines 467 to 473
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use projectId as a path param?

Copy link
Member Author

@kevinmessiaen kevinmessiaen Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true that it also can be a path variable in this case. I think it was set as a filter to show the data associated to the project but now that all catalog items will be linked to projects it make more sense to use a path variable.

Let me change it in #1175 since it's a PR that heavily refacto the catalog

async createSlicingFunction(comparisonClauses: Array<ComparisonClauseDTO>) {
Expand Down
Loading