Remove Supa
This commit is contained in:
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
const supabase = useSupabaseClient()
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import dayjs from "dayjs";
|
|||||||
const baseURL = /*"http://192.168.1.129:3333"*/ /*"http://localhost:3333"*/ "https://functions.fedeo.io"
|
const baseURL = /*"http://192.168.1.129:3333"*/ /*"http://localhost:3333"*/ "https://functions.fedeo.io"
|
||||||
|
|
||||||
export const useFunctions = () => {
|
export const useFunctions = () => {
|
||||||
const supabase = useSupabaseClient()
|
|
||||||
|
|
||||||
const getWorkingTimesEvaluationData = async (user_id, startDate, endDate) => {
|
const getWorkingTimesEvaluationData = async (user_id, startDate, endDate) => {
|
||||||
// Der neue Endpunkt ist /staff/time/evaluation und erwartet die Benutzer-ID als targetUserId Query-Parameter.
|
// Der neue Endpunkt ist /staff/time/evaluation und erwartet die Benutzer-ID als targetUserId Query-Parameter.
|
||||||
@@ -30,26 +29,6 @@ export const useFunctions = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const useCreateTicket = async (subject,message,url,source) => {
|
|
||||||
const {data:{session:{access_token}}} = await supabase.auth.getSession()
|
|
||||||
|
|
||||||
const {data} = await axios({
|
|
||||||
method: "POST",
|
|
||||||
url: `${baseURL}/functions/createticket`,
|
|
||||||
data: {
|
|
||||||
subject,
|
|
||||||
message,
|
|
||||||
source,
|
|
||||||
url
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${access_token}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return !!data.ticket_created;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const useBankingGenerateLink = async (institutionId) => {
|
const useBankingGenerateLink = async (institutionId) => {
|
||||||
return (await useNuxtApp().$api(`/api/banking/link/${institutionId}`)).link
|
return (await useNuxtApp().$api(`/api/banking/link/${institutionId}`)).link
|
||||||
@@ -81,46 +60,8 @@ export const useFunctions = () => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const useGetInvoiceData = async (file) => {
|
|
||||||
const {data:{session:{access_token}}} = await supabase.auth.getSession()
|
|
||||||
|
|
||||||
const {data} = await axios({
|
|
||||||
method: "POST",
|
|
||||||
url: `${baseURL}/functions/getinvoicedatafromgpt`,
|
|
||||||
data: {
|
|
||||||
file
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${access_token}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const useSendTelegramNotification = async (message) => {
|
|
||||||
const {data:{session:{access_token}}} = await supabase.auth.getSession()
|
|
||||||
|
|
||||||
const {data,error} = await axios({
|
|
||||||
method: "POST",
|
|
||||||
url: `${baseURL}/functions/sendtelegramnotification`,
|
|
||||||
data: {
|
|
||||||
message: message
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${access_token}`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if(error){
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const useBankingCheckInstitutions = async (bic) => {
|
const useBankingCheckInstitutions = async (bic) => {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user