/*
 * @Description:运动模块
 * @Author: Aimee·Zhang
 * @Date: 2022-01-19 13:20:39
 * @LastEditors: Aimee·Zhang
 * @LastEditTime: 2022-01-20 09:12:34
 */
import { request } from '../index'
/**
 * @description:动列表
 * @params {*} 可翻页 按名称筛选
 * @Date: 2022-01-19 13:21:35
 */

const healthSports = (data) => {
	return request({
		url: 'health/sports',
		data: data
	})
}

/**
 * @description:添加运动
 * @Date: 2022-01-19 13点27分
 */
const addHealthSports = (data) => {
	return request({
		url: 'health/exercises',
		method: 'POST',
		data: data
	})
}
/**
 * @description:编辑运动
 * @Date: 2022-01-19 17:15:31
 */
const editHealthSports = (data) => {
	return request({
		url: `health/exercises/${data.exercise_id}`,
		method: 'PUT',
		data: data
	})
}

/**
 * @description: 删除运动
 * @Date: 2022-01-20 09:12:35
 */
const delHealthSports = (data) => {
	return request({
		url: `health/exercises/${data.exercise_id}`,
		method: 'DELETE'
	})
}
export {
	healthSports,
	addHealthSports,
	editHealthSports,
	delHealthSports
}
