chore(immich): drop the IMMICH_URL hook
A deployment no longer suggests an address for the first server: every address is each account's own and is typed in the app, so the field opens blank with a placeholder. The env var, its compose passthrough, the example line and the `defaultUrl` field that carried it are all gone; the backend's config route now answers with the saved list alone.
This commit is contained in:
@@ -280,16 +280,13 @@ export function immichRoutes(
|
||||
return server;
|
||||
};
|
||||
|
||||
// The saved list, plus the address this deployment suggests for the first one.
|
||||
// No upstream call at all: the tree has to draw on a phone with no signal.
|
||||
// The saved list. No upstream call at all: the tree has to draw on a phone with
|
||||
// no signal. Nothing here suggests an address — the address and the key are each
|
||||
// account's own, typed in the app, so a fresh server is a blank field.
|
||||
app.get('/api/immich/config', async (req, reply) => {
|
||||
const user = member(req, reply);
|
||||
if (!user) return;
|
||||
return reply.send({
|
||||
ok: true,
|
||||
defaultUrl: process.env.IMMICH_URL ?? '',
|
||||
servers: immichServers(user.id).map(view),
|
||||
});
|
||||
return reply.send({ ok: true, servers: immichServers(user.id).map(view) });
|
||||
});
|
||||
|
||||
// The dialog's "check this key": nothing is stored, so a typo never becomes a
|
||||
|
||||
@@ -191,7 +191,6 @@ const server = spawn(process.execPath, entry, {
|
||||
PORT: String(PORT),
|
||||
DATA_DIR,
|
||||
NODE_ENV: 'test',
|
||||
IMMICH_URL: `http://127.0.0.1:${fake.port}`,
|
||||
},
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
});
|
||||
@@ -253,7 +252,7 @@ try {
|
||||
check('the key never comes back in clear', !JSON.stringify(saved.body).includes(KEY), JSON.stringify(saved.body));
|
||||
|
||||
const config = await user.req('/immich/config');
|
||||
check('the saved list carries the deployment default address', config.body?.defaultUrl === url, JSON.stringify(config.body?.defaultUrl));
|
||||
check('the saved list suggests no address of its own', config.body?.defaultUrl === undefined, JSON.stringify(config.body?.defaultUrl));
|
||||
check('the saved server is listed with its version', config.body?.servers?.[0]?.version === '3.1.0', JSON.stringify(config.body?.servers?.[0]));
|
||||
|
||||
// A server saved without a name falls back to its host, which is what the tree
|
||||
|
||||
Reference in New Issue
Block a user