mirror of
https://github.com/docmost/docmost.git
synced 2025-11-12 17:42:36 +10:00
fixes
* remove vite env for now * remove unnecessary comment
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
const useCollaborationURL = (): string => {
|
||||
const PATH = "/collaboration";
|
||||
|
||||
// TODO: revisit
|
||||
/*
|
||||
if (import.meta.env.VITE_COLLABORATION_URL) {
|
||||
return import.meta.env.VITE_COLLABORATION_URL + PATH;
|
||||
}
|
||||
@ -9,9 +11,12 @@ const useCollaborationURL = (): string => {
|
||||
if (!API_URL) {
|
||||
throw new Error("Backend API URL is not defined");
|
||||
}
|
||||
*/
|
||||
|
||||
const wsProtocol = API_URL.startsWith('https') ? 'wss' : 'ws';
|
||||
return `${wsProtocol}://${API_URL.split('://')[1]}${PATH}`;
|
||||
const API_URL = window.location.protocol + "//" + window.location.host;
|
||||
|
||||
const wsProtocol = API_URL.startsWith("https") ? "wss" : "ws";
|
||||
return `${wsProtocol}://${API_URL.split("://")[1]}${PATH}`;
|
||||
};
|
||||
|
||||
export default useCollaborationURL;
|
||||
|
||||
@ -23,7 +23,6 @@ export async function executeWithPagination<O, DB, TB extends keyof DB>(
|
||||
if (opts.page < 1) {
|
||||
opts.page = 1;
|
||||
}
|
||||
console.log('perpage', opts.perPage);
|
||||
qb = qb.limit(opts.perPage + 1).offset((opts.page - 1) * opts.perPage);
|
||||
|
||||
const deferredJoinPrimaryKey = opts.experimental_deferredJoinPrimaryKey;
|
||||
|
||||
Reference in New Issue
Block a user