mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Fix js import problem in js client (#234)
This commit is contained in:
@@ -66,5 +66,5 @@
|
||||
},
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"version": "1.0.547"
|
||||
"version": "1.0.548"
|
||||
}
|
||||
@@ -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": {
|
||||
|
||||
@@ -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"
|
||||
}'
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
})
|
||||
|
||||
@@ -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",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user