Add hurl test and logseq plugin

This commit is contained in:
Andrea Fazzi 2022-06-23 11:12:00 +02:00
parent db9a907d06
commit 8fa1b803b0
4 changed files with 39 additions and 0 deletions

27
client/client.go Normal file
View file

@ -0,0 +1,27 @@
package client
import "git.andreafazzi.eu/andrea/testhub/models"
type Response struct {
Status string `json:"status"`
Content interface{} `json:"content"`
}
type QuizReadAllResponse struct {
Status string `json:"status"`
Content []*models.Quiz `json:"content"`
}
type CreateQuestionRequest struct {
Text string `json:"text"`
}
type CreateAnswerRequest struct {
Text string
Correct bool
}
type CreateQuizRequest struct {
Question *CreateQuestionRequest `json:"question"`
Answers []*CreateAnswerRequest `json:"answers"`
}

1
misc/logseq Submodule

@ -0,0 +1 @@
Subproject commit c4d136df36ed12f61766d587a749117b8d7b8093

View file

@ -0,0 +1,10 @@
POST http://localhost:3000/quizzes
{
"question": {"text": "Text of Question 1"},
"answers": [
{"text": "Text of the answer 1", "correct": true},
{"text": "Text of the answer 2"},
{"text": "Text of the answer 3"},
{"text": "Text of the answer 4"}
]
}

View file

@ -0,0 +1 @@
GET http://localhost:3000/quizzes