adds upload dialog and duplicates
This commit is contained in:
@@ -67,7 +67,7 @@ const auth: Handle = async ({ event, resolve }) => {
|
||||
try {
|
||||
// get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any)
|
||||
if (pb.authStore.isValid) {
|
||||
await pb.collection('users').authRefresh()
|
||||
await pb.collection('users').authRefresh({requestKey: null})
|
||||
}
|
||||
} catch (_) {
|
||||
// clear the auth store on failed refresh
|
||||
@@ -78,7 +78,7 @@ const auth: Handle = async ({ event, resolve }) => {
|
||||
let settings: Settings | undefined;
|
||||
if (pb.authStore.model) {
|
||||
meiliApiKey = pb.authStore.model.token
|
||||
settings = await pb.collection('settings').getFirstListItem<Settings>(`user="${pb.authStore.model.id}"`)
|
||||
settings = await pb.collection('settings').getFirstListItem<Settings>(`user="${pb.authStore.model.id}"`, {requestKey: null})
|
||||
} else {
|
||||
const r = await event.fetch(pb.buildUrl("/public/search/token"));
|
||||
const response = await r.json();
|
||||
@@ -111,4 +111,12 @@ const auth: Handle = async ({ event, resolve }) => {
|
||||
return response
|
||||
}
|
||||
|
||||
export const handle = sequence(csrf(['/api/v1']), auth)
|
||||
const removeLinkFromHeaders: Handle =
|
||||
async ({ event, resolve }) => {
|
||||
const response = await resolve(event);
|
||||
response.headers.delete('link');
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
export const handle = sequence(csrf(['/api/v1']), auth, removeLinkFromHeaders)
|
||||
Reference in New Issue
Block a user