mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: added shared chats
This commit is contained in:
parent
764dd05582
commit
f22d649239
22 changed files with 1881 additions and 506 deletions
|
|
@ -11,7 +11,7 @@ enum ResponseType {
|
|||
}
|
||||
|
||||
export type RequestOptions = {
|
||||
method: "GET" | "POST" | "PUT" | "DELETE";
|
||||
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
||||
headers?: Record<string, string>;
|
||||
contentType?: "application/json" | "application/x-www-form-urlencoded";
|
||||
signal?: AbortSignal;
|
||||
|
|
@ -273,6 +273,21 @@ class BaseApiService {
|
|||
});
|
||||
}
|
||||
|
||||
async patch<T>(
|
||||
url: string,
|
||||
responseSchema?: ZodType<T>,
|
||||
options?: Omit<RequestOptions, "method" | "responseType">
|
||||
) {
|
||||
return this.request(url, responseSchema, {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
...options,
|
||||
responseType: ResponseType.JSON,
|
||||
});
|
||||
}
|
||||
|
||||
async getBlob(url: string, options?: Omit<RequestOptions, "method" | "responseType">) {
|
||||
return this.request(url, undefined, {
|
||||
...options,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue