feat: dbcontext abstraction via dependency

This commit is contained in:
2025-06-21 02:27:23 +03:00
parent 03c072e67b
commit 0c4d618fa4
7 changed files with 112 additions and 4 deletions

View File

@@ -128,6 +128,17 @@ const docTemplate = `{
"Auth"
],
"summary": "Register an account",
"parameters": [
{
"description": "desc",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.RegistrationBeginRequest"
}
}
],
"responses": {}
}
},
@@ -310,6 +321,21 @@ const docTemplate = `{
"type": "string"
}
}
},
"models.RegistrationBeginRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"description": "TODO: password checking",
"type": "string"
},
"username": {
"type": "string"
}
}
}
},
"securityDefinitions": {

View File

@@ -124,6 +124,17 @@
"Auth"
],
"summary": "Register an account",
"parameters": [
{
"description": "desc",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.RegistrationBeginRequest"
}
}
],
"responses": {}
}
},
@@ -306,6 +317,21 @@
"type": "string"
}
}
},
"models.RegistrationBeginRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"description": "TODO: password checking",
"type": "string"
},
"username": {
"type": "string"
}
}
}
},
"securityDefinitions": {

View File

@@ -21,6 +21,16 @@ definitions:
refresh_token:
type: string
type: object
models.RegistrationBeginRequest:
properties:
email:
type: string
password:
description: 'TODO: password checking'
type: string
username:
type: string
type: object
info:
contact: {}
description: Easy and feature-rich wishlist.
@@ -97,6 +107,13 @@ paths:
post:
consumes:
- application/json
parameters:
- description: desc
in: body
name: request
required: true
schema:
$ref: '#/definitions/models.RegistrationBeginRequest'
produces:
- application/json
responses: {}