]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/rest/rest-extractor.service.ts
Add new follow, mention and user registered notifs
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / rest / rest-extractor.service.ts
index 0d5b6d6f3fa1c25e5837f137b22b00969c20a411..f149569ef5028b2a5c27f6e92dc0bf432db957ba 100644 (file)
@@ -11,9 +11,7 @@ export class RestExtractor {
   constructor (
     private router: Router,
     private i18n: I18n
-  ) {
-    // empty
-  }
+  ) { }
 
   extractDataBool () {
     return true
@@ -35,7 +33,7 @@ export class RestExtractor {
     return this.applyToResultListData(result, this.convertDateToHuman, [ fieldsToConvert ])
   }
 
-  convertDateToHuman (target: object, fieldsToConvert: string[]) {
+  convertDateToHuman (target: { [ id: string ]: string }, fieldsToConvert: string[]) {
     fieldsToConvert.forEach(field => target[field] = dateToHuman(target[field]))
 
     return target
@@ -85,7 +83,7 @@ export class RestExtractor {
       errorMessage = err
     }
 
-    const errorObj = {
+    const errorObj: { message: string, status: string, body: string } = {
       message: errorMessage,
       status: undefined,
       body: undefined