mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
infra(server)!: fix typeorm asset entity relations (#1782)
* fix: add correct relations to asset typeorm entity * fix: add missing createdAt column to asset entity * ci: run check to make sure generated API is up-to-date * ci: cancel workflows that aren't for the latest commit in a branch * chore: add fvm config for flutter
This commit is contained in:
104
web/src/api/open-api/api.ts
generated
104
web/src/api/open-api/api.ts
generated
@@ -4,7 +4,7 @@
|
||||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.47.2
|
||||
* The version of the OpenAPI document: 1.47.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -61,10 +61,10 @@ export interface APIKeyCreateResponseDto {
|
||||
export interface APIKeyResponseDto {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @type {string}
|
||||
* @memberof APIKeyResponseDto
|
||||
*/
|
||||
'id': number;
|
||||
'id': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -467,13 +467,13 @@ export interface AssetResponseDto {
|
||||
* @type {string}
|
||||
* @memberof AssetResponseDto
|
||||
*/
|
||||
'createdAt': string;
|
||||
'fileCreatedAt': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AssetResponseDto
|
||||
*/
|
||||
'modifiedAt': string;
|
||||
'fileModifiedAt': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -2356,11 +2356,11 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteKey: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
deleteKey: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('deleteKey', 'id', id)
|
||||
const localVarPath = `/api-key/{id}`
|
||||
@@ -2389,11 +2389,11 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getKey: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
getKey: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getKey', 'id', id)
|
||||
const localVarPath = `/api-key/{id}`
|
||||
@@ -2451,12 +2451,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {APIKeyUpdateDto} aPIKeyUpdateDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateKey: async (id: number, aPIKeyUpdateDto: APIKeyUpdateDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
updateKey: async (id: string, aPIKeyUpdateDto: APIKeyUpdateDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('updateKey', 'id', id)
|
||||
// verify required parameter 'aPIKeyUpdateDto' is not null or undefined
|
||||
@@ -2510,21 +2510,21 @@ export const APIKeyApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteKey(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteKey(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteKey(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getKey(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<APIKeyResponseDto>> {
|
||||
async getKey(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<APIKeyResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getKey(id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@@ -2539,12 +2539,12 @@ export const APIKeyApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {APIKeyUpdateDto} aPIKeyUpdateDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateKey(id: number, aPIKeyUpdateDto: APIKeyUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<APIKeyResponseDto>> {
|
||||
async updateKey(id: string, aPIKeyUpdateDto: APIKeyUpdateDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<APIKeyResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateKey(id, aPIKeyUpdateDto, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@@ -2569,20 +2569,20 @@ export const APIKeyApiFactory = function (configuration?: Configuration, basePat
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteKey(id: number, options?: any): AxiosPromise<void> {
|
||||
deleteKey(id: string, options?: any): AxiosPromise<void> {
|
||||
return localVarFp.deleteKey(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getKey(id: number, options?: any): AxiosPromise<APIKeyResponseDto> {
|
||||
getKey(id: string, options?: any): AxiosPromise<APIKeyResponseDto> {
|
||||
return localVarFp.getKey(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
@@ -2595,12 +2595,12 @@ export const APIKeyApiFactory = function (configuration?: Configuration, basePat
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {APIKeyUpdateDto} aPIKeyUpdateDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateKey(id: number, aPIKeyUpdateDto: APIKeyUpdateDto, options?: any): AxiosPromise<APIKeyResponseDto> {
|
||||
updateKey(id: string, aPIKeyUpdateDto: APIKeyUpdateDto, options?: any): AxiosPromise<APIKeyResponseDto> {
|
||||
return localVarFp.updateKey(id, aPIKeyUpdateDto, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
@@ -2626,23 +2626,23 @@ export class APIKeyApi extends BaseAPI {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof APIKeyApi
|
||||
*/
|
||||
public deleteKey(id: number, options?: AxiosRequestConfig) {
|
||||
public deleteKey(id: string, options?: AxiosRequestConfig) {
|
||||
return APIKeyApiFp(this.configuration).deleteKey(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof APIKeyApi
|
||||
*/
|
||||
public getKey(id: number, options?: AxiosRequestConfig) {
|
||||
public getKey(id: string, options?: AxiosRequestConfig) {
|
||||
return APIKeyApiFp(this.configuration).getKey(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@@ -2658,13 +2658,13 @@ export class APIKeyApi extends BaseAPI {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} id
|
||||
* @param {string} id
|
||||
* @param {APIKeyUpdateDto} aPIKeyUpdateDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof APIKeyApi
|
||||
*/
|
||||
public updateKey(id: number, aPIKeyUpdateDto: APIKeyUpdateDto, options?: AxiosRequestConfig) {
|
||||
public updateKey(id: string, aPIKeyUpdateDto: APIKeyUpdateDto, options?: AxiosRequestConfig) {
|
||||
return APIKeyApiFp(this.configuration).updateKey(id, aPIKeyUpdateDto, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@@ -4432,8 +4432,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
* @param {string} createdAt
|
||||
* @param {string} modifiedAt
|
||||
* @param {string} fileCreatedAt
|
||||
* @param {string} fileModifiedAt
|
||||
* @param {boolean} isFavorite
|
||||
* @param {string} fileExtension
|
||||
* @param {any} [livePhotoData]
|
||||
@@ -4442,7 +4442,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'assetType' is not null or undefined
|
||||
assertParamExists('uploadFile', 'assetType', assetType)
|
||||
// verify required parameter 'assetData' is not null or undefined
|
||||
@@ -4451,10 +4451,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
assertParamExists('uploadFile', 'deviceAssetId', deviceAssetId)
|
||||
// verify required parameter 'deviceId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'deviceId', deviceId)
|
||||
// verify required parameter 'createdAt' is not null or undefined
|
||||
assertParamExists('uploadFile', 'createdAt', createdAt)
|
||||
// verify required parameter 'modifiedAt' is not null or undefined
|
||||
assertParamExists('uploadFile', 'modifiedAt', modifiedAt)
|
||||
// verify required parameter 'fileCreatedAt' is not null or undefined
|
||||
assertParamExists('uploadFile', 'fileCreatedAt', fileCreatedAt)
|
||||
// verify required parameter 'fileModifiedAt' is not null or undefined
|
||||
assertParamExists('uploadFile', 'fileModifiedAt', fileModifiedAt)
|
||||
// verify required parameter 'isFavorite' is not null or undefined
|
||||
assertParamExists('uploadFile', 'isFavorite', isFavorite)
|
||||
// verify required parameter 'fileExtension' is not null or undefined
|
||||
@@ -4497,12 +4497,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
||||
localVarFormParams.append('deviceId', deviceId as any);
|
||||
}
|
||||
|
||||
if (createdAt !== undefined) {
|
||||
localVarFormParams.append('createdAt', createdAt as any);
|
||||
if (fileCreatedAt !== undefined) {
|
||||
localVarFormParams.append('fileCreatedAt', fileCreatedAt as any);
|
||||
}
|
||||
|
||||
if (modifiedAt !== undefined) {
|
||||
localVarFormParams.append('modifiedAt', modifiedAt as any);
|
||||
if (fileModifiedAt !== undefined) {
|
||||
localVarFormParams.append('fileModifiedAt', fileModifiedAt as any);
|
||||
}
|
||||
|
||||
if (isFavorite !== undefined) {
|
||||
@@ -4772,8 +4772,8 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
* @param {string} createdAt
|
||||
* @param {string} modifiedAt
|
||||
* @param {string} fileCreatedAt
|
||||
* @param {string} fileModifiedAt
|
||||
* @param {boolean} isFavorite
|
||||
* @param {string} fileExtension
|
||||
* @param {any} [livePhotoData]
|
||||
@@ -4782,8 +4782,8 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options);
|
||||
async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
}
|
||||
@@ -5002,8 +5002,8 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
* @param {string} createdAt
|
||||
* @param {string} modifiedAt
|
||||
* @param {string} fileCreatedAt
|
||||
* @param {string} fileModifiedAt
|
||||
* @param {boolean} isFavorite
|
||||
* @param {string} fileExtension
|
||||
* @param {any} [livePhotoData]
|
||||
@@ -5012,8 +5012,8 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
||||
return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath));
|
||||
uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
||||
return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -5275,8 +5275,8 @@ export class AssetApi extends BaseAPI {
|
||||
* @param {any} assetData
|
||||
* @param {string} deviceAssetId
|
||||
* @param {string} deviceId
|
||||
* @param {string} createdAt
|
||||
* @param {string} modifiedAt
|
||||
* @param {string} fileCreatedAt
|
||||
* @param {string} fileModifiedAt
|
||||
* @param {boolean} isFavorite
|
||||
* @param {string} fileExtension
|
||||
* @param {any} [livePhotoData]
|
||||
@@ -5286,8 +5286,8 @@ export class AssetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof AssetApi
|
||||
*/
|
||||
public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
||||
return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath));
|
||||
public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
||||
return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
web/src/api/open-api/base.ts
generated
2
web/src/api/open-api/base.ts
generated
@@ -4,7 +4,7 @@
|
||||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.47.2
|
||||
* The version of the OpenAPI document: 1.47.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
2
web/src/api/open-api/common.ts
generated
2
web/src/api/open-api/common.ts
generated
@@ -4,7 +4,7 @@
|
||||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.47.2
|
||||
* The version of the OpenAPI document: 1.47.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
2
web/src/api/open-api/configuration.ts
generated
2
web/src/api/open-api/configuration.ts
generated
@@ -4,7 +4,7 @@
|
||||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.47.2
|
||||
* The version of the OpenAPI document: 1.47.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
2
web/src/api/open-api/index.ts
generated
2
web/src/api/open-api/index.ts
generated
@@ -4,7 +4,7 @@
|
||||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.47.2
|
||||
* The version of the OpenAPI document: 1.47.3
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
};
|
||||
|
||||
const getDateRange = () => {
|
||||
const startDate = new Date(album.assets[0].createdAt);
|
||||
const endDate = new Date(album.assets[album.assetCount - 1].createdAt);
|
||||
const startDate = new Date(album.assets[0].fileCreatedAt);
|
||||
const endDate = new Date(album.assets[album.assetCount - 1].fileCreatedAt);
|
||||
|
||||
const startDateString = startDate.toLocaleDateString(locale, albumDateFormat);
|
||||
const endDateString = endDate.toLocaleDateString(locale, albumDateFormat);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
let hoveredDateGroup = '';
|
||||
$: assetsGroupByDate = lodash
|
||||
.chain(assets)
|
||||
.groupBy((a) => new Date(a.createdAt).toLocaleDateString(locale, groupDateFormat))
|
||||
.groupBy((a) => new Date(a.fileCreatedAt).toLocaleDateString(locale, groupDateFormat))
|
||||
.sortBy((group) => assets.indexOf(group[0]))
|
||||
.value();
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
bind:clientHeight={actualBucketHeight}
|
||||
>
|
||||
{#each assetsGroupByDate as assetsInDateGroup, groupIndex (assetsInDateGroup[0].id)}
|
||||
{@const dateGroupTitle = new Date(assetsInDateGroup[0].createdAt).toLocaleDateString(
|
||||
{@const dateGroupTitle = new Date(assetsInDateGroup[0].fileCreatedAt).toLocaleDateString(
|
||||
locale,
|
||||
groupDateFormat
|
||||
)}
|
||||
|
||||
@@ -65,7 +65,7 @@ function createAssetInteractionStore() {
|
||||
const navigateAsset = async (direction: 'next' | 'previous') => {
|
||||
// Flatten and sort the asset by date if there are new assets
|
||||
if (assetSortedByDate.length === 0 || savedAssetLength !== _assetGridState.assets.length) {
|
||||
assetSortedByDate = sortBy(_assetGridState.assets, (a) => a.createdAt);
|
||||
assetSortedByDate = sortBy(_assetGridState.assets, (a) => a.fileCreatedAt);
|
||||
savedAssetLength = _assetGridState.assets.length;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ async function fileUploader(
|
||||
const assetType = mimeType.split('/')[0].toUpperCase();
|
||||
const fileExtension = getFilenameExtension(asset.name);
|
||||
const formData = new FormData();
|
||||
const createdAt = new Date(asset.lastModified).toISOString();
|
||||
const fileCreatedAt = new Date(asset.lastModified).toISOString();
|
||||
const deviceAssetId = 'web' + '-' + asset.name + '-' + asset.lastModified;
|
||||
|
||||
try {
|
||||
@@ -83,10 +83,10 @@ async function fileUploader(
|
||||
formData.append('assetType', assetType);
|
||||
|
||||
// Get Asset Created Date
|
||||
formData.append('createdAt', createdAt);
|
||||
formData.append('fileCreatedAt', fileCreatedAt);
|
||||
|
||||
// Get Asset Modified At
|
||||
formData.append('modifiedAt', new Date(asset.lastModified).toISOString());
|
||||
formData.append('fileModifiedAt', new Date(asset.lastModified).toISOString());
|
||||
|
||||
// Set Asset is Favorite to false
|
||||
formData.append('isFavorite', 'false');
|
||||
|
||||
Reference in New Issue
Block a user