mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[APPS-2157][APPS-2158][APPS-2161][APPS-2162][APPS-2165] Migration from moment to date-fns (#8965)
* [APPS-2157][APPS-2158][APPS-2161][APPS-2162][2165] Migration from moment to date-fns * Modified endDate to CompletedDate * Addressed review comments * Revert import for dataFnsUtil * Replace fit to it * fix types and avoid double date conversion * fix lint issue * support iso strings for date formatting --------- Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ export class UploadActions {
|
||||
this.nodesApi = new NodesApi(apiService.getInstance());
|
||||
}
|
||||
|
||||
async uploadFile(fileLocation, fileName, parentFolderId): Promise<any> {
|
||||
async uploadFile(fileLocation: fs.PathLike, fileName: string, parentFolderId: string): Promise<NodeEntry> {
|
||||
const file = fs.createReadStream(fileLocation);
|
||||
|
||||
return this.uploadApi.uploadFile(
|
||||
@@ -50,7 +50,7 @@ export class UploadActions {
|
||||
);
|
||||
}
|
||||
|
||||
async createEmptyFiles(emptyFileNames: string[], parentFolderId): Promise<NodeEntry> {
|
||||
async createEmptyFiles(emptyFileNames: string[], parentFolderId: string): Promise<NodeEntry> {
|
||||
const filesRequest = [];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
||||
@@ -64,7 +64,7 @@ export class UploadActions {
|
||||
return this.nodesApi.createNode(parentFolderId, filesRequest as any, {});
|
||||
}
|
||||
|
||||
async createFolder(folderName, parentFolderId): Promise<NodeEntry> {
|
||||
async createFolder(folderName: string, parentFolderId: string): Promise<NodeEntry> {
|
||||
return this.nodesApi.createNode(parentFolderId, {
|
||||
name: folderName,
|
||||
nodeType: 'cm:folder'
|
||||
|
Reference in New Issue
Block a user