fix: add posthog error monitor

This commit is contained in:
David Nguyen
2025-02-25 15:14:45 +11:00
parent cedd5e87b1
commit 7e8955b89c
17 changed files with 175 additions and 148 deletions

View File

@ -2,6 +2,8 @@ import { DocumentDataType } from '@prisma/client';
import { base64 } from '@scure/base';
import { match } from 'ts-pattern';
import { getPresignGetUrl } from './server-actions';
export type GetFileOptions = {
type: DocumentDataType;
data: string;
@ -30,8 +32,6 @@ const getFileFromBytes64 = (data: string) => {
};
const getFileFromS3 = async (key: string) => {
const { getPresignGetUrl } = await import('./server-actions');
const { url } = await getPresignGetUrl(key);
const response = await fetch(url, {

View File

@ -2,6 +2,8 @@ import { DocumentDataType } from '@prisma/client';
import { base64 } from '@scure/base';
import { match } from 'ts-pattern';
import { getAbsolutePresignPostUrl } from './server-actions';
export type UpdateFileOptions = {
type: DocumentDataType;
oldData: string;
@ -37,8 +39,6 @@ const updateFileWithBytes64 = (data: string) => {
};
const updateFileWithS3 = async (key: string, data: string) => {
const { getAbsolutePresignPostUrl } = await import('./server-actions');
const { url } = await getAbsolutePresignPostUrl(key);
const response = await fetch(url, {