Merge branch 'release/1.0.0' into feature/debug-info

This commit is contained in:
Alexey Safronov 2021-10-05 09:58:24 +03:00
commit 7a72a9f80d
2 changed files with 16 additions and 3 deletions

View File

@ -214,9 +214,9 @@ export default function withContent(WrappedContent) {
};
getTableStatusByDate = (create) => {
const { created, updated, fileExst } = this.props.item;
const { created, updated } = this.props.item;
const date = fileExst ? updated : created;
const date = create ? created : updated;
const dateLabel = new Date(date).toLocaleString(this.props.culture);
return dateLabel;
};

View File

@ -1913,7 +1913,20 @@ namespace ASC.Api.Documents
/// <param name="fileIds">File IDs</param>
/// <returns></returns>
[Delete("favorites")]
public bool DeleteFavorites([ModelBinder(BinderType = typeof(BaseBatchModelBinder))] BaseBatchModel model)
[Consumes("application/json")]
public bool DeleteFavoritesFromBody([FromBody] BaseBatchModel model)
{
return DeleteFavorites(model);
}
[Delete("favorites")]
public bool DeleteFavoritesFromQuery([FromQuery][ModelBinder(BinderType = typeof(BaseBatchModelBinder))] BaseBatchModel model)
{
return DeleteFavorites(model);
}
private bool DeleteFavorites(BaseBatchModel model)
{
var (folderIntIds, folderStringIds) = FileOperationsManager.GetIds(model.FolderIds);
var (fileIntIds, fileStringIds) = FileOperationsManager.GetIds(model.FileIds);