This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.js
73 lines (71 loc) · 3.39 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const wrapper = (fn, arg) => {
return new Promise((resolve, reject) => {
fn(arg).then((response) => {
if (response.body.ok) {
resolve(response.body)
} else {
reject(response.body)
}
})
})
}
const getUser = require('./getUser.js')
const postUser = require('./postUser.js')
const postUserLogin = require('./postUserLogin.js')
const getUserChoirs = require('./getUserChoirs.js')
const getUserByEmail = require('./getUserByEmail.js')
const getChoir = require('./getChoir.js')
const getChoirMembers = require('./getChoirMembers.js')
const getChoirSong = require('./getChoirSong.js')
const deleteChoirSong = require('./deleteChoirSong')
const getChoirSongs = require('./getChoirSongs.js')
const postChoir = require('./postChoir.js')
const postChoirJoin = require('./postChoirJoin.js')
const deleteChoirJoin = require('./deleteChoirJoin.js')
const postChoirSong = require('./postChoirSong.js')
const postChoirSongPartName = require('./postChoirSongPartName.js')
const deleteChoirSongPartName = require('./deleteChoirSongPartName.js')
const postChoirSongPart = require('./postChoirSongPart.js')
const postChoirSongPartUpload = require('./postChoirSongPartUpload.js')
const postChoirSongPartDownload = require('./postChoirSongPartDownload.js')
const getChoirSongPart = require('./getChoirSongPart.js')
const deleteChoirSongPart = require('./deleteChoirSongPart.js')
const getChoirSongParts = require('./getChoirSongParts.js')
const postInvitation = require('./postInvitation.js')
const getInvitation = require('./getInvitation.js')
const getInvitationList = require('./getInvitationList.js')
const deleteInvitation = require('./deleteInvitation.js')
const postRender = require('./postRender.js')
const getRender = require('./getRender.js')
const getRenderDone = require('./getRenderDone.js')
module.exports = {
getUser: arg => wrapper(getUser, arg),
postUser: arg => wrapper(postUser, arg),
postUserLogin: arg => wrapper(postUserLogin, arg),
getUserChoirs: arg => wrapper(getUserChoirs, arg),
getUserByEmail: arg => wrapper(getUserByEmail, arg),
getChoir: arg => wrapper(getChoir, arg),
getChoirMembers: arg => wrapper(getChoirMembers, arg),
getChoirSong: arg => wrapper(getChoirSong, arg),
deleteChoirSong: arg => wrapper(deleteChoirSong, arg),
getChoirSongs: arg => wrapper(getChoirSongs, arg),
postChoir: arg => wrapper(postChoir, arg),
postChoirJoin: arg => wrapper(postChoirJoin, arg),
deleteChoirJoin: arg => wrapper(deleteChoirJoin, arg),
postChoirSong: arg => wrapper(postChoirSong, arg),
postChoirSongPartName: arg => wrapper(postChoirSongPartName, arg),
deleteChoirSongPartName: arg => wrapper(deleteChoirSongPartName, arg),
postChoirSongPart: arg => wrapper(postChoirSongPart, arg),
postChoirSongPartUpload: arg => wrapper(postChoirSongPartUpload, arg),
postChoirSongPartDownload: arg => wrapper(postChoirSongPartDownload, arg),
getChoirSongPart: arg => wrapper(getChoirSongPart, arg),
deleteChoirSongPart: arg => wrapper(deleteChoirSongPart, arg),
getChoirSongParts: arg => wrapper(getChoirSongParts, arg),
postInvitation: arg => wrapper(postInvitation, arg),
getInvitation: arg => wrapper(getInvitation, arg),
getInvitationList: arg => wrapper(getInvitationList, arg),
deleteInvitation: arg => wrapper(deleteInvitation, arg),
postRender: arg => wrapper(postRender, arg),
getRender: arg => wrapper(getRender, arg),
getRenderDone: arg => wrapper(getRenderDone, arg)
}