Commit 58c6a35e authored by Denys Mishunov's avatar Denys Mishunov

Process blobs array

In the multi-file scenario for snippets we switch to 'blobs' array
instead of direct 'blob' object
parent f7ade70a
...@@ -11,7 +11,7 @@ fragment SnippetBase on Snippet { ...@@ -11,7 +11,7 @@ fragment SnippetBase on Snippet {
webUrl webUrl
httpUrlToRepo httpUrlToRepo
sshUrlToRepo sshUrlToRepo
blob { blobs {
binary binary
name name
path path
......
...@@ -11,6 +11,7 @@ export const getSnippetMixin = { ...@@ -11,6 +11,7 @@ export const getSnippetMixin = {
}, },
update: data => data.snippets.edges[0]?.node, update: data => data.snippets.edges[0]?.node,
result(res) { result(res) {
this.blobs = res.data.snippets.edges[0].node.blobs;
if (this.onSnippetFetch) { if (this.onSnippetFetch) {
this.onSnippetFetch(res); this.onSnippetFetch(res);
} }
...@@ -27,6 +28,7 @@ export const getSnippetMixin = { ...@@ -27,6 +28,7 @@ export const getSnippetMixin = {
return { return {
snippet: {}, snippet: {},
newSnippet: false, newSnippet: false,
blobs: [],
}; };
}, },
computed: { computed: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment