Added backend code to handle the editting of resources