Skip to content

Commit

Permalink
Export fetchApi
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 12, 2024
1 parent 41d4025 commit a6d722a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/composable/useGroupApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useGroupApi(route: any) {
{ immediate: true }
)

return { group, error, loading }
return { group, error, loading, fetchApi }
}

export type { GroupApi }
2 changes: 1 addition & 1 deletion dist/composable/useGroupApi.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("../types-zCR7NhwB.cjs");function i(u){const t=e.ref(!1),a=e.ref(),s=e.ref({id:0,name:"",slug:"",description:"",icon:"",created_at:"",updated_at:"",deleted_at:null,users_count:0});async function o(){t.value=!0,a.value=null,await n.axios.get("/api/groups/g/"+u.params.slug).then(r=>{s.value=r.data}).catch(r=>{a.value={description:"An error as occurred",style:n.a.Danger,closeBtn:!0,...r.response.data}}).finally(()=>{t.value=!1})}return e.watch(()=>u.params.slug,()=>{o()},{immediate:!0}),{group:s,error:a,loading:t}}exports.useGroupApi=i;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../types-zCR7NhwB.cjs");function i(u){const t=e.ref(!1),a=e.ref(),s=e.ref({id:0,name:"",slug:"",description:"",icon:"",created_at:"",updated_at:"",deleted_at:null,users_count:0});async function n(){t.value=!0,a.value=null,await o.axios.get("/api/groups/g/"+u.params.slug).then(r=>{s.value=r.data}).catch(r=>{a.value={description:"An error as occurred",style:o.a.Danger,closeBtn:!0,...r.response.data}}).finally(()=>{t.value=!1})}return e.watch(()=>u.params.slug,()=>{n()},{immediate:!0}),{group:s,error:a,loading:t,fetchApi:n}}exports.useGroupApi=i;
1 change: 1 addition & 0 deletions dist/composable/useGroupApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ export declare function useGroupApi(route: any): {
}>;
error: import('vue').Ref<AlertInterface | null | undefined, AlertInterface | null | undefined>;
loading: import('vue').Ref<boolean, boolean>;
fetchApi: () => Promise<void>;
};
export type { GroupApi };
2 changes: 1 addition & 1 deletion dist/composable/useGroupApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function d(s) {
o();
},
{ immediate: !0 }
), { group: n, error: e, loading: a };
), { group: n, error: e, loading: a, fetchApi: o };
}
export {
d as useGroupApi
Expand Down

0 comments on commit a6d722a

Please sign in to comment.