Последняя версия с сервера прошлого разработчика

This commit is contained in:
2025-07-10 04:35:51 +00:00
commit c731570032
1174 changed files with 134314 additions and 0 deletions

22
resources/js/includes/composables/useApi.js vendored Executable file
View File

@@ -0,0 +1,22 @@
import { ref } from 'vue'
export const useApi = (getResult) => {
const result = ref(null)
const loading = ref(false)
const error = ref(false)
async function callAPI() {
result.value = null
loading.value = true
error.value = false
try {
result.value = await getResult()
} catch {
error.value = true
} finally {
loading.value = false
}
}
return { result, loading, error, callAPI }
}