Added softkey data in the Favorite softkey API
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Step.Database.Controllers;
|
||||
using Step.Model.DatabaseModels;
|
||||
using Step.Model.DTOModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -22,7 +23,7 @@ namespace Step.Controllers.WebApi
|
||||
// Find user id from the bearer token
|
||||
var userId = identity.Claims.Where(c => c.Type == USER_ID_KEY).FirstOrDefault();
|
||||
int userIdInt = Convert.ToInt32(userId.Value);
|
||||
using (FavoriteUserSoftkeysController controller = new FavoriteUserSoftkeysController())
|
||||
using (UserSoftkeysController controller = new UserSoftkeysController())
|
||||
{
|
||||
return Ok(
|
||||
controller.GetUserFavoriteSoftkeys(userIdInt)
|
||||
@@ -38,11 +39,11 @@ namespace Step.Controllers.WebApi
|
||||
|
||||
var userId = identity.Claims.Where(c => c.Type == USER_ID_KEY).FirstOrDefault();
|
||||
int intUserId = Convert.ToInt32(userId.Value);
|
||||
using (FavoriteUserSoftkeysController controller = new FavoriteUserSoftkeysController())
|
||||
using (UserSoftkeysController controller = new UserSoftkeysController())
|
||||
{
|
||||
// Delete saved softkey
|
||||
controller.DeleteUserSoftkeyModel(intUserId);
|
||||
List<FavoriteUserSoftkeyModel> favorite = new List<FavoriteUserSoftkeyModel>();
|
||||
List<DTOUserSoftKeyConfigModel> favorite = new List<DTOUserSoftKeyConfigModel>();
|
||||
if (favoriteSoftkeyIds != null && favoriteSoftkeyIds.Count > 0)
|
||||
{
|
||||
// Insert new list of id
|
||||
|
||||
Reference in New Issue
Block a user