def delete_experience(experience_id): """ DELETE /api/v1/experiences/:experience_id """ the_experience = storage.get(Experience, experience_id) if not the_experience: return {"success": False, "message": "Experience not found"}, 400 storage.delete(the_experience) storage.save() return {"success": True, "message": "Experience deleted successfully"}, 200
def delete_state(state_id): """ DELETE /api/v1/states/:state_id""" the_state = storage.get(State, state_id) if not the_state: return {"failed": True, "message": "data not found"}, 400 storage.delete(the_state) storage.save() return {"success": True, "message": "deleted successfully"}, 200
def delete_job(job_id): """ DELETE /api/v1/jobs/job_id """ the_job = storage.get(Job, job_id) if not the_job: return {"success": False, "message": "Job not found"}, 400 storage.delete(the_job) storage.save() return {"success": True, "message": "Job deleted successfully"}, 200
def delete_recruiter(recruiter_id): """ DELETE /api/v1/recruiters/:recruiter_id """ the_recruiter = storage.get(Recruiter, recruiter_id) if not the_recruiter: return {"success": False, "message": "Recruiter not found"}, 400 storage.delete(the_recruiter) storage.save() return {"success": True, "message": "deleted successfully"}, 200
def delete_project(project_id): """ DELETE /api/v1/projects/:project_id """ the_project = storage.get(Project, project_id) if not project_id: return {"success": False, "message": "Project not found"}, 400 storage.delete(the_project) storage.save() return {"success": True, "message": "Project deleted successfully"}, 200
def delete_education(education_id): """ DELETE /api/v1/educations/:education_id """ the_education = storage.get(Education, education_id) if not the_education: return {"success": False, "message": "Education not found"}, 400 storage.delete(the_education) storage.save() return { "success": True, "message": "Education deleted successfully", }, 200
def delete_certificate(certificate_id): """ DELETE /api/v1/certificates/:certificate_id """ the_certificate = storage.get(Certificate, certificate_id) if not certificate_id: return {"success": False, "message": "Certificate not found"}, 400 storage.delete(the_certificate) storage.save() return { "success": True, "message": "Certificate deleted successfully" }, 200
def delete_country(country_id): """ DELETE /api/v1/countries/:country_id """ the_country = storage.get(Country, country_id) if not the_country: return { "failed": True, "message": "data not found" }, 400 storage.delete(the_country) storage.save() return { "success": True, "message": "deleted successfully" }, 200