hooked up clientside post controller to api endpoint