a b/web-app/client/src/services/apiService.js
1
import Api from '@/services/api'
2
3
export default {
4
  castBallot(electionId, voterId, picked) {
5
    return Api().post('castBallot', {       
6
      electionId: electionId,
7
      voterId: voterId,
8
      picked: picked
9
    })
10
  },
11
  queryAll() {
12
    return Api().get('queryAll')
13
  },
14
  queryByObjectType() {
15
    return Api().get('queryByObjectType')
16
  },
17
  queryWithQueryString(selected) {
18
    return Api().post('queryWithQueryString', {
19
      selected: selected
20
    }) 
21
  },
22
  registerPatient(name, age, adharNo, phNo) {
23
    return Api().post('registerPatient', {
24
      name: name,
25
      age: age,
26
      adharNo: adharNo,
27
      phNo: phNo,
28
      
29
    }) 
30
  },
31
  validateVoter(voterId) {
32
    return Api().post('validateVoter', {
33
      voterId: voterId
34
    }) 
35
  },
36
  queryByKey(key) {
37
    return Api().post('queryByKey', {
38
      key: key
39
    }) 
40
  },
41
  getCurrentStanding() {
42
    return Api().get('getCurrentStanding')
43
  }
44
}