completed the api for edit category page