Skip to content

Commit

Permalink
修复登录日志保存
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Oct 18, 2024
1 parent 4244502 commit 3822c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion back/services/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default class UserService {
(a, b) => b.info!.timestamp! - a.info!.timestamp!,
);
if (result.length > 100) {
const ids = result.slice(0, result.length - 100).map((x) => x.id!);
const ids = result.slice(100).map((x) => x.id!);
await SystemModel.destroy({
where: { id: ids },
});
Expand Down

0 comments on commit 3822c37

Please sign in to comment.