fix
This commit is contained in:
@@ -32,7 +32,10 @@ public class SettingsMotionController : BaseApiController
|
||||
{
|
||||
var list = _motionService.GetAllCategories(UserId);
|
||||
|
||||
return list.Select(x => x.ToModel()).OrderByDescending(x => x.SortOrder);
|
||||
return list
|
||||
.Select(x => x.ToModel())
|
||||
.OrderByDescending(x => x.SortOrder)
|
||||
.ThenBy(x => x.Name);
|
||||
}
|
||||
|
||||
[HttpPost("~/api/settings/motion-categories")]
|
||||
@@ -42,7 +45,7 @@ public class SettingsMotionController : BaseApiController
|
||||
switch (exec.Status)
|
||||
{
|
||||
case GeneralExecStatus.success:
|
||||
return exec.Result!;
|
||||
return exec.Result!.ToModel();
|
||||
|
||||
case GeneralExecStatus.failure:
|
||||
case GeneralExecStatus.not_found:
|
||||
@@ -60,7 +63,7 @@ public class SettingsMotionController : BaseApiController
|
||||
switch (exec.Status)
|
||||
{
|
||||
case GeneralExecStatus.success:
|
||||
return exec.Result!;
|
||||
return exec.Result!.ToModel();
|
||||
|
||||
case GeneralExecStatus.failure:
|
||||
case GeneralExecStatus.not_found:
|
||||
@@ -97,9 +100,11 @@ public class SettingsMotionController : BaseApiController
|
||||
{
|
||||
var list = category.IsMissing()
|
||||
? _motionService.GetAll(UserId)
|
||||
: _motionService.GetByCategory(UserId, category.AsGuid());
|
||||
: _motionService.GetByCategory(UserId, category!.AsGuid());
|
||||
|
||||
return list.Select(x => x.ToModel());
|
||||
return list
|
||||
.OrderBy(x => x.MotionGlobal.Name)
|
||||
.Select(x => x.ToModel());
|
||||
}
|
||||
|
||||
[HttpPut("~/api/settings/motions/{id}")]
|
||||
|
||||
Reference in New Issue
Block a user