Move graph into deb/ package, passing collection factory. #169

This commit is contained in:
Andrey Smirnov
2015-01-13 19:10:39 +03:00
parent b50cb70a0e
commit 427c42f4b8
3 changed files with 17 additions and 19 deletions
+4 -4
View File
@@ -3,21 +3,21 @@ package api
import (
"bytes"
"fmt"
"github.com/gin-gonic/gin"
"github.com/smira/aptly/deb"
"io"
"os"
"os/exec"
"github.com/gin-gonic/gin"
"github.com/smira/aptly/graph"
)
// GET /api/graph
func apiGraph(c *gin.Context) {
var (
err error
err error
output []byte
)
graph, err := graph.BuildGraph(context)
graph, err := deb.BuildGraph(context.CollectionFactory())
if err != nil {
c.JSON(500, err)
return