aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-08-25 11:45:31 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-08-25 11:45:31 +0200
commit0aef76c479bc7fc758e70e1cd478ade46761b51b (patch)
treeed59eae3ee731c56d25cc35a382f4cc400d0dece /server/helpers/utils.ts
parent93e1258c7cbc0d1235ca6d2a1f7c1875985328b8 (diff)
downloadPeerTube-0aef76c479bc7fc758e70e1cd478ade46761b51b.tar.gz
PeerTube-0aef76c479bc7fc758e70e1cd478ade46761b51b.tar.zst
PeerTube-0aef76c479bc7fc758e70e1cd478ade46761b51b.zip
Formated -> Formatted
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r--server/helpers/utils.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index f326210f3..af5be0c69 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -14,19 +14,19 @@ function generateRandomString (size: number) {
14} 14}
15 15
16interface FormatableToJSON { 16interface FormatableToJSON {
17 toFormatedJSON () 17 toFormattedJSON ()
18} 18}
19 19
20function getFormatedObjects<U, T extends FormatableToJSON> (objects: T[], objectsTotal: number) { 20function getFormattedObjects<U, T extends FormatableToJSON> (objects: T[], objectsTotal: number) {
21 const formatedObjects: U[] = [] 21 const formattedObjects: U[] = []
22 22
23 objects.forEach(object => { 23 objects.forEach(object => {
24 formatedObjects.push(object.toFormatedJSON()) 24 formattedObjects.push(object.toFormattedJSON())
25 }) 25 })
26 26
27 const res: ResultList<U> = { 27 const res: ResultList<U> = {
28 total: objectsTotal, 28 total: objectsTotal,
29 data: formatedObjects 29 data: formattedObjects
30 } 30 }
31 31
32 return res 32 return res
@@ -52,6 +52,6 @@ function isSignupAllowed () {
52export { 52export {
53 badRequest, 53 badRequest,
54 generateRandomString, 54 generateRandomString,
55 getFormatedObjects, 55 getFormattedObjects,
56 isSignupAllowed 56 isSignupAllowed
57} 57}