mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
fix repo history set limit (#7382)
This commit is contained in:
@@ -48,11 +48,9 @@ class LibHistorySetting extends React.Component {
|
||||
days = this.state.expireDays;
|
||||
}
|
||||
let repoID = this.props.repoID;
|
||||
let reg = /^-?\d+$/;
|
||||
let flag = reg.test(days);
|
||||
if (flag) {
|
||||
if (Number(days) > 0) {
|
||||
let message = gettext('Successfully set library history.');
|
||||
seafileAPI.setRepoHistoryLimit(repoID, days).then(res => {
|
||||
seafileAPI.setRepoHistoryLimit(repoID, parseInt(days)).then(res => {
|
||||
toaster.success(message);
|
||||
this.setState({ keepDays: res.data.keep_days });
|
||||
this.props.toggleDialog();
|
||||
|
Reference in New Issue
Block a user