mirror of
https://github.com/immich-app/immich.git
synced 2025-12-04 05:39:46 +09:00
refactor: authentication on public routes (#6765)
* refactor: authentication on public routes * fix: remove public user * pr feedback * pr feedback * pr feedback * pr feedback * remove unused method * fix: tests * fix: useless methods * fix: tests * pr feedback * pr feedback * chore: cleanup --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import type { AssetResponseDto, ServerVersionResponseDto } from '@api';
|
||||
import { type Socket, io } from 'socket.io-client';
|
||||
import { writable } from 'svelte/store';
|
||||
import { get, writable } from 'svelte/store';
|
||||
import { loadConfig } from './server-config.store';
|
||||
import { getAuthUser } from '$lib/utils/auth';
|
||||
import { user } from './user.store';
|
||||
|
||||
export interface ReleaseEvent {
|
||||
isAvailable: boolean;
|
||||
@@ -30,8 +30,7 @@ export const openWebsocketConnection = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const user = await getAuthUser();
|
||||
if (!user) {
|
||||
if (!get(user)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user