1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Formated -> Formatted

This commit is contained in:
Chocobozzz 2017-08-25 11:45:31 +02:00
parent 93e1258c7c
commit 0aef76c479
17 changed files with 63 additions and 63 deletions

View file

@ -14,19 +14,19 @@ function generateRandomString (size: number) {
}
interface FormatableToJSON {
toFormatedJSON ()
toFormattedJSON ()
}
function getFormatedObjects<U, T extends FormatableToJSON> (objects: T[], objectsTotal: number) {
const formatedObjects: U[] = []
function getFormattedObjects<U, T extends FormatableToJSON> (objects: T[], objectsTotal: number) {
const formattedObjects: U[] = []
objects.forEach(object => {
formatedObjects.push(object.toFormatedJSON())
formattedObjects.push(object.toFormattedJSON())
})
const res: ResultList<U> = {
total: objectsTotal,
data: formatedObjects
data: formattedObjects
}
return res
@ -52,6 +52,6 @@ function isSignupAllowed () {
export {
badRequest,
generateRandomString,
getFormatedObjects,
getFormattedObjects,
isSignupAllowed
}