moving logic of fetching keys into controller and adding a flash notice for updation