Fixed missing function to get post data