completed the api for updating category