]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix some inconsistency in link (#97)
authorRonan <flyingrub@protonmail.com>
Fri, 13 Oct 2017 06:14:40 +0000 (08:14 +0200)
committerBigard Florian <florian.bigard@gmail.com>
Fri, 13 Oct 2017 06:14:40 +0000 (08:14 +0200)
Some link could appear with double // in url.
e.g : "POST /api/v1/videos//upload HTTP/1.1"

client/src/app/videos/shared/video.service.ts

index fe7f9108d3b6281c95dc753db15c863129348359..fc552f2b524cfb9020bb837f8dc0938201e0256e 100644 (file)
@@ -52,13 +52,13 @@ export class VideoService {
       nsfw: video.nsfw
     }
 
-    return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${video.id}`, body)
+    return this.authHttp.put(VideoService.BASE_VIDEO_URL + video.id, body)
                         .map(this.restExtractor.extractDataBool)
                         .catch(this.restExtractor.handleError)
   }
 
   uploadVideo (video: FormData) {
-    const req = new HttpRequest('POST', `${VideoService.BASE_VIDEO_URL}/upload`, video, { reportProgress: true })
+    const req = new HttpRequest('POST', VideoService.BASE_VIDEO_URL + 'upload', video, { reportProgress: true })
 
     return this.authHttp.request(req)
                         .catch(this.restExtractor.handleError)
@@ -116,7 +116,7 @@ export class VideoService {
   }
 
   getUserVideoRating (id: number): Observable<UserVideoRate> {
-    const url = UserService.BASE_USERS_URL + '/me/videos/' + id + '/rating'
+    const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating'
 
     return this.authHttp.get(url)
                         .catch(res => this.restExtractor.handleError(res))