Various fixes: profilePicture / logo upload, imageIdentifiers (#6530)
In this PR: - refactoring auth module to extract a jwt module that can be re-used from other part of the app (avoiding circular dependencies file module => auth => file (file and auth both need jwt actually) - activating imageIdentfier on person on workspace creation (this will put back the images on people) - fixing picture upload (we were missing some fileToken)
This commit is contained in:
@ -114,6 +114,8 @@ export class WorkspaceSyncObjectMetadataIdentifiersService {
|
||||
...objectMetadata,
|
||||
labelIdentifierFieldMetadataId:
|
||||
labelIdentifierFieldMetadata?.id ?? null,
|
||||
imageIdentifierFieldMetadataId:
|
||||
imageIdentifierFieldMetadata?.id ?? null,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -161,9 +163,12 @@ export class WorkspaceSyncObjectMetadataIdentifiersService {
|
||||
);
|
||||
}
|
||||
|
||||
if (imageIdentifierFieldMetadata) {
|
||||
if (
|
||||
imageIdentifierFieldMetadata &&
|
||||
imageIdentifierFieldMetadata.type !== FieldMetadataType.TEXT
|
||||
) {
|
||||
throw new Error(
|
||||
`Image identifier field for object ${objectMetadata.nameSingular} are not supported yet.`,
|
||||
`Image identifier field for object ${objectMetadata.nameSingular} has invalid type ${imageIdentifierFieldMetadata.type}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user