Skip to content

Commit

Permalink
Forgot to rename the method
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 11, 2024
1 parent f6b1dd1 commit 41d4025
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/assets/composable/useGroupCreateApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function useGroupCreateApi() {
const apiLoading = ref<Boolean>(false)
const apiError = ref<AlertInterface | null>(null)

async function submitGroupEdit(data: GroupCreateForm) {
async function submitGroupCreate(data: GroupCreateForm) {
apiLoading.value = true
apiError.value = null
return axios
Expand Down Expand Up @@ -57,7 +57,7 @@ export function useGroupCreateApi() {
})
}

return { submitGroupEdit, apiLoading, apiError }
return { submitGroupCreate, apiLoading, apiError }
}

export type { GroupCreateForm, GroupCreateResponse }
2 changes: 1 addition & 1 deletion dist/composable/useGroupCreateApi.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),u=require("../types-zCR7NhwB.cjs");function n(){const t=a.ref(!1),r=a.ref(null);async function s(o){return t.value=!0,r.value=null,u.axios.post("/api/groups",o).then(e=>({success:e.data.success,message:e.data.message,group:e.data.group})).catch(e=>{throw r.value={description:"An error as occurred",style:u.a.Danger,closeBtn:!0,...e.response.data},r.value}).finally(()=>{t.value=!1})}return{submitGroupEdit:s,apiLoading:t,apiError:r}}exports.useGroupCreateApi=n;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),u=require("../types-zCR7NhwB.cjs");function n(){const a=t.ref(!1),r=t.ref(null);async function s(o){return a.value=!0,r.value=null,u.axios.post("/api/groups",o).then(e=>({success:e.data.success,message:e.data.message,group:e.data.group})).catch(e=>{throw r.value={description:"An error as occurred",style:u.a.Danger,closeBtn:!0,...e.response.data},r.value}).finally(()=>{a.value=!1})}return{submitGroupCreate:s,apiLoading:a,apiError:r}}exports.useGroupCreateApi=n;
2 changes: 1 addition & 1 deletion dist/composable/useGroupCreateApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface GroupCreateResponse {
* API Composable
*/
export declare function useGroupCreateApi(): {
submitGroupEdit: (data: GroupCreateForm) => Promise<{
submitGroupCreate: (data: GroupCreateForm) => Promise<{
success: boolean;
message: string;
group: GroupCreateForm;
Expand Down
6 changes: 3 additions & 3 deletions dist/composable/useGroupCreateApi.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ref as t } from "vue";
import { a as o, b as n } from "../types-Ht7brb6q.js";
function l() {
function i() {
const e = t(!1), r = t(null);
async function s(u) {
return e.value = !0, r.value = null, o.post("/api/groups", u).then((a) => ({
Expand All @@ -18,8 +18,8 @@ function l() {
e.value = !1;
});
}
return { submitGroupEdit: s, apiLoading: e, apiError: r };
return { submitGroupCreate: s, apiLoading: e, apiError: r };
}
export {
l as useGroupCreateApi
i as useGroupCreateApi
};

0 comments on commit 41d4025

Please sign in to comment.