Fix js import problem in js client (#234)

This commit is contained in:
Janos Dobronszki
2021-10-15 11:31:45 +01:00
committed by GitHub
parent 70ffee4f4d
commit 82c6fe360d
7 changed files with 7 additions and 7 deletions

View File

@@ -66,5 +66,5 @@
},
"type": "module",
"types": "dist/index.d.ts",
"version": "1.0.547"
"version": "1.0.548"
}

View File

@@ -2,7 +2,7 @@
"name": "m3o",
"version": "1.0.1",
"description": "",
"main": "dist/index.js",
"main": "dist",
"types": "dist/index.d.ts",
"type": "module",
"repository": {

View File

@@ -2,5 +2,5 @@ curl "https://api.m3o.com/v1/answer/Question" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MICRO_API_TOKEN" \
-d '{
"query": "google"
"query": "microsoft"
}'

View File

@@ -10,7 +10,7 @@ import (
func AskAquestion() {
answerService := answer.NewAnswerService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := answerService.Question(&answer.QuestionRequest{
Query: "google",
Query: "microsoft",
})
fmt.Println(rsp, err)
}

View File

@@ -4,7 +4,7 @@ import * as answer from "m3o/answer";
async function AskAquestion() {
let answerService = new answer.AnswerService(process.env.MICRO_API_TOKEN);
let rsp = await answerService.question({
query: "google",
query: "microsoft",
});
console.log(rsp);
}

View File

@@ -11,10 +11,10 @@ func CreateArecord() {
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := dbService.Create(&db.CreateRequest{
Record: map[string]interface{}{
"id": "1",
"name": "Jane",
"age": 42,
"isActive": true,
"id": "1",
},
Table: "users",
})

View File

@@ -11,8 +11,8 @@ func UpdateArecord() {
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := dbService.Update(&db.UpdateRequest{
Record: map[string]interface{}{
"age": 43,
"id": "1",
"age": 43,
},
Table: "users",
})