Remove `lite`, correct `/channels`

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
Drasko DRASKOVIC 2016-09-20 23:48:01 +02:00
parent 57a4535bc4
commit 04710ad019
7 changed files with 17 additions and 17 deletions

View File

@ -7,7 +7,7 @@ import (
"log"
"encoding/json"
"github.com/mainflux/mainflux-lite/db"
"github.com/mainflux/mainflux/db"
"github.com/krylovsk/gosenml"
"github.com/kataras/iris"

View File

@ -45,7 +45,7 @@ func (this *Config) Parse() {
viper.SetConfigFile(os.Args[1])
} else {
// default cfg path to source dir, as we keep cfg.yml there
cfgDir := os.Getenv("GOPATH") + "/src/github.com/mainflux/mainflux-lite/config"
cfgDir := os.Getenv("GOPATH") + "/src/github.com/mainflux/mainflux/config"
viper.SetConfigName("config") // name of config file (without extension)
viper.AddConfigPath(cfgDir) // path to look for the config file in
}

View File

@ -14,9 +14,9 @@ import (
"log"
"time"
"github.com/mainflux/mainflux-lite/db"
"github.com/mainflux/mainflux-lite/models"
"github.com/mainflux/mainflux-lite/clients"
"github.com/mainflux/mainflux/db"
"github.com/mainflux/mainflux/models"
"github.com/mainflux/mainflux/clients"
"github.com/satori/go.uuid"
"gopkg.in/mgo.v2/bson"
@ -47,7 +47,6 @@ func CreateChannel(ctx *iris.Context) {
Db.Init()
defer Db.Close()
c := models.Channel{}
json.Unmarshal(ctx.RequestCtx.Request.Body(), &c)
@ -58,8 +57,9 @@ func CreateChannel(ctx *iris.Context) {
c.Id = uuid.String()
// Insert reference to DeviceId
if c.Device = nil {
if c.Device == "" {
ctx.JSON(iris.StatusBadRequest, iris.Map{"response": "No device ID in request body"})
return
}
// TODO Check if Device ID is valid (in database)

View File

@ -14,8 +14,8 @@ import (
"log"
"time"
"github.com/mainflux/mainflux-lite/db"
"github.com/mainflux/mainflux-lite/models"
"github.com/mainflux/mainflux/db"
"github.com/mainflux/mainflux/models"
"github.com/satori/go.uuid"
"gopkg.in/mgo.v2/bson"

View File

@ -13,10 +13,10 @@ import (
"os"
"strings"
"strconv"
"github.com/mainflux/mainflux-lite/config"
"github.com/mainflux/mainflux-lite/db"
"github.com/mainflux/mainflux-lite/servers"
"github.com/mainflux/mainflux-lite/clients"
"github.com/mainflux/mainflux/config"
"github.com/mainflux/mainflux/db"
"github.com/mainflux/mainflux/servers"
"github.com/mainflux/mainflux/clients"
"github.com/fatih/color"
"runtime"
"flag"

View File

@ -11,8 +11,8 @@ package servers
import (
"strconv"
"github.com/mainflux/mainflux-lite/controllers"
"github.com/mainflux/mainflux-lite/config"
"github.com/mainflux/mainflux/controllers"
"github.com/mainflux/mainflux/config"
"github.com/iris-contrib/middleware/logger"
"github.com/kataras/iris"

View File

@ -15,8 +15,8 @@ import (
"log"
"os"
"github.com/mainflux/mainflux-lite/config"
mfdb "github.com/mainflux/mainflux-lite/db"
"github.com/mainflux/mainflux/config"
mfdb "github.com/mainflux/mainflux/db"
"github.com/kataras/iris"
"github.com/ory-am/dockertest"