added delete agent function

sig-changes^2
Joshua Collins 4 years ago
parent 955429f4ab
commit 8f0cb0b7b6
  1. 2
      app/store/agents.js

@ -44,7 +44,7 @@ const Agents = () => {
obj.deleteAgentById = (agentId) => {
const index = obj.agents.findIndex(agent => agent.id === agentId)
if (index !== -1) {
obj.splice(index, 1)
obj.agents.splice(index, 1)
return true
} else {
return false

Loading…
Cancel
Save