Use the same create logic for Mailer report creation

This commit is contained in:
Eli Ribble 2026-04-21 14:41:06 +00:00
parent f927b0a911
commit bd3e42f83e
No known key found for this signature in database
4 changed files with 13 additions and 24 deletions

View file

@ -4,7 +4,7 @@ import { ref } from "vue";
import { apiClient } from "@/client";
import {
PublicReport,
type PublicReportCreateRequest,
type PublicReportComplianceCreateRequest,
type PublicReportDTO,
} from "@/type/api";
@ -43,8 +43,8 @@ export const useStorePublicReport = defineStore("publicreport", () => {
}
return byID(id);
}
async function create(
data: PublicReportCreateRequest,
async function createCompliance(
data: PublicReportComplianceCreateRequest,
): Promise<PublicReport> {
const resp = (await apiClient.JSONPost(
"/api/rmo/compliance",
@ -59,6 +59,6 @@ export const useStorePublicReport = defineStore("publicreport", () => {
add,
byID,
byURI,
create,
createCompliance,
};
});