diff --git a/api/internal/logic/core/gethashcatlogic.go b/api/internal/logic/core/gethashcatlogic.go index eb26b700..25c63a61 100644 --- a/api/internal/logic/core/gethashcatlogic.go +++ b/api/internal/logic/core/gethashcatlogic.go @@ -40,7 +40,7 @@ func NewGetHashcatLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetHas func (l *GetHashcatLogic) GetHashcat(req *types.GetHashcatHandlerReq) (resp *types.GetHashcatHandlerResp, err error) { // todo: add your logic here and delete this line var hashcat *models.THashcat - tx := l.svcCtx.DbEngin.Where("crack_task_id = ?", req.CrackTaskId).Find(&hashcat) + tx := l.svcCtx.DbEngin.Where("crack_task_id = ?", req.CrackTaskId).Order("id desc").Limit(1).Find(&hashcat) if tx.Error != nil { return nil, tx.Error }