mirror of
https://github.com/immich-app/immich.git
synced 2025-02-04 01:09:14 -05:00
Added error handling for layout.server.ts to avoid unaccessible to previous deploy instance due to changes in SvelteKit project
This commit is contained in:
parent
a09bba454c
commit
fdd9f37abd
4 changed files with 27 additions and 24 deletions
|
@ -360,7 +360,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 51;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
@ -495,7 +495,7 @@
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 51;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
@ -522,7 +522,7 @@
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 51;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.21.0</string>
|
<string>1.26.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>40</string>
|
<string>51</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true />
|
<true />
|
||||||
<key>MGLMapboxMetricsEnabledSettingShownInApp</key>
|
<key>MGLMapboxMetricsEnabledSettingShownInApp</key>
|
||||||
|
|
|
@ -5,32 +5,32 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000205">
|
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000349">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="1: increment_version_number" time="0.360401">
|
<testcase classname="fastlane.lanes" name="1: increment_version_number" time="0.650297">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="2: latest_testflight_build_number" time="4.012696">
|
<testcase classname="fastlane.lanes" name="2: latest_testflight_build_number" time="7.757602">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="3: increment_build_number" time="0.378836">
|
<testcase classname="fastlane.lanes" name="3: increment_build_number" time="0.421008">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="4: build_app" time="80.023705">
|
<testcase classname="fastlane.lanes" name="4: build_app" time="126.240949">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="5: upload_to_testflight" time="98.18403">
|
<testcase classname="fastlane.lanes" name="5: upload_to_testflight" time="68.206021">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,26 @@
|
||||||
import { browser } from '$app/env';
|
import { serverApi } from '@api';
|
||||||
import { api, serverApi } from '@api';
|
|
||||||
import * as cookieParser from 'cookie';
|
import * as cookieParser from 'cookie';
|
||||||
|
|
||||||
import type { LayoutServerLoad } from './$types';
|
import type { LayoutServerLoad } from './$types';
|
||||||
|
|
||||||
export const load: LayoutServerLoad = async ({ request }) => {
|
export const load: LayoutServerLoad = async ({ request }) => {
|
||||||
const cookies = cookieParser.parse(request.headers.get('cookie') || '');
|
try {
|
||||||
const accessToken = cookies['immich_access_token'];
|
const cookies = cookieParser.parse(request.headers.get('cookie') || '');
|
||||||
|
const accessToken = cookies['immich_access_token'];
|
||||||
|
|
||||||
|
if (!accessToken) {
|
||||||
|
return {
|
||||||
|
user: undefined
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
serverApi.setAccessToken(accessToken);
|
||||||
|
const { data: userInfo } = await serverApi.userApi.getMyUserInfo();
|
||||||
|
|
||||||
if (!accessToken) {
|
|
||||||
return {
|
return {
|
||||||
user: undefined
|
user: userInfo
|
||||||
};
|
};
|
||||||
|
} catch (e) {
|
||||||
|
console.log('[ERROR] layout.server.ts [LayoutServerLoad]: ', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
serverApi.setAccessToken(accessToken);
|
|
||||||
const { data: userInfo } = await serverApi.userApi.getMyUserInfo();
|
|
||||||
|
|
||||||
return {
|
|
||||||
user: userInfo
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue