mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 15:05:01 +00:00
Fix js import problem in js client (#234)
This commit is contained in:
@@ -66,5 +66,5 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"version": "1.0.547"
|
"version": "1.0.548"
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "m3o",
|
"name": "m3o",
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ curl "https://api.m3o.com/v1/answer/Question" \
|
|||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||||
-d '{
|
-d '{
|
||||||
"query": "google"
|
"query": "microsoft"
|
||||||
}'
|
}'
|
||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
func AskAquestion() {
|
func AskAquestion() {
|
||||||
answerService := answer.NewAnswerService(os.Getenv("MICRO_API_TOKEN"))
|
answerService := answer.NewAnswerService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := answerService.Question(&answer.QuestionRequest{
|
rsp, err := answerService.Question(&answer.QuestionRequest{
|
||||||
Query: "google",
|
Query: "microsoft",
|
||||||
})
|
})
|
||||||
fmt.Println(rsp, err)
|
fmt.Println(rsp, err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import * as answer from "m3o/answer";
|
|||||||
async function AskAquestion() {
|
async function AskAquestion() {
|
||||||
let answerService = new answer.AnswerService(process.env.MICRO_API_TOKEN);
|
let answerService = new answer.AnswerService(process.env.MICRO_API_TOKEN);
|
||||||
let rsp = await answerService.question({
|
let rsp = await answerService.question({
|
||||||
query: "google",
|
query: "microsoft",
|
||||||
});
|
});
|
||||||
console.log(rsp);
|
console.log(rsp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ func CreateArecord() {
|
|||||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := dbService.Create(&db.CreateRequest{
|
rsp, err := dbService.Create(&db.CreateRequest{
|
||||||
Record: map[string]interface{}{
|
Record: map[string]interface{}{
|
||||||
"id": "1",
|
|
||||||
"name": "Jane",
|
"name": "Jane",
|
||||||
"age": 42,
|
"age": 42,
|
||||||
"isActive": true,
|
"isActive": true,
|
||||||
|
"id": "1",
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ func UpdateArecord() {
|
|||||||
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
dbService := db.NewDbService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := dbService.Update(&db.UpdateRequest{
|
rsp, err := dbService.Update(&db.UpdateRequest{
|
||||||
Record: map[string]interface{}{
|
Record: map[string]interface{}{
|
||||||
"age": 43,
|
|
||||||
"id": "1",
|
"id": "1",
|
||||||
|
"age": 43,
|
||||||
},
|
},
|
||||||
Table: "users",
|
Table: "users",
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user