import http from '../http'
import { https } from '../https'

export default {
  page: data => http.post('/v1/onl_form_head/page', data).then(res => res),
  deleteById: id => http.delete('/v1/onl_form_head/' + id).then(res => res),
  getById: id => http.get('/v1/onl_form_head/' + id).then(res => res),
  edit: data =>
    http.put('/v1/onl_form_head?id=' + data.id, data.obj).then(res => res),
  add: data => http.post('/v1/onl_form_head/', data).then(res => res),
  synchTable: data =>
    http.post('/v1/onl_form_head/synch-table?id=' + data).then(res => res),
  addOnlineTable: data =>
    https
      .post('/v1/onl_form_head/add-online-table', JSON.stringify(data))
      .then(res => res)
}
