mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +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;
|
days = this.state.expireDays;
|
||||||
}
|
}
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
let reg = /^-?\d+$/;
|
if (Number(days) > 0) {
|
||||||
let flag = reg.test(days);
|
|
||||||
if (flag) {
|
|
||||||
let message = gettext('Successfully set library history.');
|
let message = gettext('Successfully set library history.');
|
||||||
seafileAPI.setRepoHistoryLimit(repoID, days).then(res => {
|
seafileAPI.setRepoHistoryLimit(repoID, parseInt(days)).then(res => {
|
||||||
toaster.success(message);
|
toaster.success(message);
|
||||||
this.setState({ keepDays: res.data.keep_days });
|
this.setState({ keepDays: res.data.keep_days });
|
||||||
this.props.toggleDialog();
|
this.props.toggleDialog();
|
||||||
|
Reference in New Issue
Block a user