summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repo/services/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repo/services/index.js')
-rw-r--r--app/assets/javascripts/repo/services/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/repo/services/index.js b/app/assets/javascripts/repo/services/index.js
index 57c234cd4c9..49301fb47d5 100644
--- a/app/assets/javascripts/repo/services/index.js
+++ b/app/assets/javascripts/repo/services/index.js
@@ -11,8 +11,13 @@ export default {
getFileData(endpoint) {
return Vue.http.get(endpoint, { params: { format: 'json' } });
},
- getRawFileData(endpoint) {
- return Vue.http.get(endpoint);
+ getRawFileData(file) {
+ if (file.tempFile) {
+ return Promise.resolve('');
+ }
+
+ return Vue.http.get(file.rawPath, { params: { format: 'json' } })
+ .then(res => res.text());
},
getBranchData(projectId, currentBranch) {
return Api.branchSingle(projectId, currentBranch);