diff --git a/openbas-api/src/test/java/io/openbas/rest/AtomicTestingApiTest.java b/openbas-api/src/test/java/io/openbas/rest/AtomicTestingApiTest.java index 3a474a3461..ddc9379d30 100644 --- a/openbas-api/src/test/java/io/openbas/rest/AtomicTestingApiTest.java +++ b/openbas-api/src/test/java/io/openbas/rest/AtomicTestingApiTest.java @@ -13,9 +13,7 @@ import io.openbas.database.repository.InjectStatusRepository; import io.openbas.database.repository.InjectorContractRepository; import io.openbas.utils.mockUser.WithMockAdminUser; - import java.time.Instant; - import org.junit.jupiter.api.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; @@ -32,14 +30,10 @@ public class AtomicTestingApiTest extends IntegrationTest { static InjectStatus INJECT_STATUS; static String NEW_INJECT_ID; - @Autowired - private MockMvc mvc; - @Autowired - private InjectRepository injectRepository; - @Autowired - private InjectorContractRepository injectorContractRepository; - @Autowired - private InjectStatusRepository injectStatusRepository; + @Autowired private MockMvc mvc; + @Autowired private InjectRepository injectRepository; + @Autowired private InjectorContractRepository injectorContractRepository; + @Autowired private InjectStatusRepository injectStatusRepository; @BeforeAll void beforeAll() { diff --git a/openbas-front/src/actions/payloads/Payload.d.ts b/openbas-front/src/actions/payloads/Payload.d.ts index 14a779961b..8aa6aada4f 100644 --- a/openbas-front/src/actions/payloads/Payload.d.ts +++ b/openbas-front/src/actions/payloads/Payload.d.ts @@ -10,3 +10,5 @@ export type PayloadStore = Omit & { executable_arch?: string; payload_attack_patterns?: string[]; }; + +export type PayloadStatus = 'UNVERIFIED' | 'VERIFIED' | 'DEPRECATED'; diff --git a/openbas-front/src/admin/components/payloads/Payloads.tsx b/openbas-front/src/admin/components/payloads/Payloads.tsx index 52f51d84b4..a629cc51ff 100644 --- a/openbas-front/src/admin/components/payloads/Payloads.tsx +++ b/openbas-front/src/admin/components/payloads/Payloads.tsx @@ -7,7 +7,7 @@ import type { CollectorHelper } from '../../../actions/collectors/collector-help import { fetchDocuments } from '../../../actions/Document'; import type { DocumentHelper } from '../../../actions/helper'; import { searchPayloads } from '../../../actions/Payload'; -import type { PayloadStore } from '../../../actions/payloads/Payload'; +import type { PayloadStatus, PayloadStore } from '../../../actions/payloads/Payload'; import Breadcrumbs from '../../../components/Breadcrumbs'; import Drawer from '../../../components/common/Drawer'; import ExportButton from '../../../components/common/ExportButton'; @@ -23,7 +23,6 @@ import ItemTags from '../../../components/ItemTags'; import PayloadIcon from '../../../components/PayloadIcon'; import PlatformIcon from '../../../components/PlatformIcon'; import { useHelper } from '../../../store'; -import { PayloadStatus } from '../../../utils/api-types'; import { useAppDispatch } from '../../../utils/hooks'; import useDataLoader from '../../../utils/hooks/useDataLoader'; import CreatePayload from './CreatePayload'; diff --git a/openbas-front/src/admin/components/scenarios/ScenarioForm.tsx b/openbas-front/src/admin/components/scenarios/ScenarioForm.tsx index 0dad01346b..6217979498 100644 --- a/openbas-front/src/admin/components/scenarios/ScenarioForm.tsx +++ b/openbas-front/src/admin/components/scenarios/ScenarioForm.tsx @@ -50,7 +50,7 @@ const ScenarioForm: FunctionComponent = ({ scenario_tags: z.string().array().optional(), scenario_external_reference: z.string().optional(), scenario_external_url: z.string().optional(), - scenario_mail_from: z.string().email(t('Should be a valid email address')), + scenario_mail_from: z.string().email(t('Should be a valid email address')).optional(), scenario_mails_reply_to: z.array(z.string().email(t('Should be a valid email address'))).optional(), scenario_message_header: z.string().optional(), scenario_message_footer: z.string().optional(),