mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(server): memory lane title (#2772)
* fix(server): memory lane title * feat: parallel requests * pr feedback * fix test --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
32
web/src/api/open-api/api.ts
generated
32
web/src/api/open-api/api.ts
generated
@@ -5523,13 +5523,13 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} timezone
|
||||
* @param {string} timestamp Get pictures for +24 hours from this time going back x years
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMemoryLane: async (timezone: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'timezone' is not null or undefined
|
||||
assertParamExists('getMemoryLane', 'timezone', timezone)
|
||||
getMemoryLane: async (timestamp: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'timestamp' is not null or undefined
|
||||
assertParamExists('getMemoryLane', 'timestamp', timestamp)
|
||||
const localVarPath = `/asset/memory-lane`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@@ -5551,8 +5551,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
if (timezone !== undefined) {
|
||||
localVarQueryParameter['timezone'] = timezone;
|
||||
if (timestamp !== undefined) {
|
||||
localVarQueryParameter['timestamp'] = (timestamp as any instanceof Date) ?
|
||||
(timestamp as any).toISOString() :
|
||||
timestamp;
|
||||
}
|
||||
|
||||
|
||||
@@ -6157,12 +6159,12 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} timezone
|
||||
* @param {string} timestamp Get pictures for +24 hours from this time going back x years
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getMemoryLane(timezone: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MemoryLaneResponseDto>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(timezone, options);
|
||||
async getMemoryLane(timestamp: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MemoryLaneResponseDto>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMemoryLane(timestamp, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -6446,12 +6448,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {string} timezone
|
||||
* @param {string} timestamp Get pictures for +24 hours from this time going back x years
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMemoryLane(timezone: string, options?: any): AxiosPromise<Array<MemoryLaneResponseDto>> {
|
||||
return localVarFp.getMemoryLane(timezone, options).then((request) => request(axios, basePath));
|
||||
getMemoryLane(timestamp: string, options?: any): AxiosPromise<Array<MemoryLaneResponseDto>> {
|
||||
return localVarFp.getMemoryLane(timestamp, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get all asset of a device that are in the database, ID only.
|
||||
@@ -6857,11 +6859,11 @@ export interface AssetApiGetMapMarkersRequest {
|
||||
*/
|
||||
export interface AssetApiGetMemoryLaneRequest {
|
||||
/**
|
||||
*
|
||||
* Get pictures for +24 hours from this time going back x years
|
||||
* @type {string}
|
||||
* @memberof AssetApiGetMemoryLane
|
||||
*/
|
||||
readonly timezone: string
|
||||
readonly timestamp: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7304,7 +7306,7 @@ export class AssetApi extends BaseAPI {
|
||||
* @memberof AssetApi
|
||||
*/
|
||||
public getMemoryLane(requestParameters: AssetApiGetMemoryLaneRequest, options?: AxiosRequestConfig) {
|
||||
return AssetApiFp(this.configuration).getMemoryLane(requestParameters.timezone, options).then((request) => request(this.axios, this.basePath));
|
||||
return AssetApiFp(this.configuration).getMemoryLane(requestParameters.timestamp, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
|
||||
onMount(async () => {
|
||||
if (!$memoryStore) {
|
||||
const timezone = DateTime.local().zoneName;
|
||||
const { data } = await api.assetApi.getMemoryLane({ timezone });
|
||||
const { data } = await api.assetApi.getMemoryLane({
|
||||
timestamp: DateTime.local().startOf('day').toISO()
|
||||
});
|
||||
$memoryStore = data;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
$: shouldRender = memoryLane.length > 0;
|
||||
|
||||
onMount(async () => {
|
||||
const timezone = DateTime.local().zoneName;
|
||||
const { data } = await api.assetApi.getMemoryLane({ timezone });
|
||||
const { data } = await api.assetApi.getMemoryLane({
|
||||
timestamp: DateTime.local().startOf('day').toISO()
|
||||
});
|
||||
|
||||
memoryLane = data;
|
||||
$memoryStore = data;
|
||||
|
||||
Reference in New Issue
Block a user