X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Futils.ts;h=af5be0c69dcbc40b845c22bcd82b7c90d122d956;hb=6599f096d5a26f2cc9624359d92cc501ec189586;hp=f326210f32886fd5136ee1511820cffeaed5bdd3;hpb=291e8d3eed88fe714fb74ad897ac2c67347a85ff;p=github%2FChocobozzz%2FPeerTube.git 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) { } interface FormatableToJSON { - toFormatedJSON () + toFormattedJSON () } -function getFormatedObjects (objects: T[], objectsTotal: number) { - const formatedObjects: U[] = [] +function getFormattedObjects (objects: T[], objectsTotal: number) { + const formattedObjects: U[] = [] objects.forEach(object => { - formatedObjects.push(object.toFormatedJSON()) + formattedObjects.push(object.toFormattedJSON()) }) const res: ResultList = { total: objectsTotal, - data: formatedObjects + data: formattedObjects } return res @@ -52,6 +52,6 @@ function isSignupAllowed () { export { badRequest, generateRandomString, - getFormatedObjects, + getFormattedObjects, isSignupAllowed }