how to edit and update data using api in vue 3