animeic-cd 1 жил өмнө
parent
commit
304a23b3dd
2 өөрчлөгдсөн 28 нэмэгдсэн , 1 устгасан
  1. 27 0
      src/api/tmp
  2. 1 1
      src/db/db.go

+ 27 - 0
src/api/tmp

@@ -0,0 +1,27 @@
+/user/login/password
+
+{
+  "phone": "15871230137",
+  "password": "qaz123456",
+  "key": "cr-svc"
+}
+
+/user/register
+
+
+{
+    "phone": "15871230137",
+    "code": "343324",
+    "password": "qaz123456",
+    "regInfo": {
+      "key": "cr-svc"
+    }
+  }
+
+/user/sms
+
+{
+    "phone": "15871230137",
+    "use": "register"
+  }
+

+ 1 - 1
src/db/db.go

@@ -36,7 +36,7 @@ func (db *MongoDB) GetOrCreateDatabase(name string) *mongo.Database {
 
 func NewMongoDB(bus *comm.NatsBus) *MongoDB {
 
-	inst, err := bus.NewMongoDBFromConfigDev("cr-mongo")
+	inst, err := bus.NewMongoDBFromConfig("cr-mongo")
 
 	if err != nil {
 		panic(err)