mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 14:18:12 +00:00
partial repository layer added
This commit is contained in:
@@ -3,7 +3,7 @@ package middleware
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"wallet-api/pkg/models"
|
||||
"wallet-api/pkg/model"
|
||||
"wallet-api/pkg/utl/configs"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -13,11 +13,12 @@ import (
|
||||
SecretCode
|
||||
|
||||
Checks if secret code from body is valid.
|
||||
Args:
|
||||
*gin.Context: Gin Application Context.
|
||||
|
||||
Args:
|
||||
*gin.Context: Gin Application Context.
|
||||
*/
|
||||
func SecretCode(c *gin.Context) {
|
||||
exceptionReturn := new(models.Exception)
|
||||
exceptionReturn := new(model.Exception)
|
||||
secretCode := ExtractCode(c)
|
||||
secret := os.Getenv("SECRET_CODE")
|
||||
if secret == "" {
|
||||
@@ -37,8 +38,9 @@ func SecretCode(c *gin.Context) {
|
||||
ExtractCode
|
||||
|
||||
Extracts the secret code from body.
|
||||
Args:
|
||||
*gin.Context: Gin Application Context.
|
||||
|
||||
Args:
|
||||
*gin.Context: Gin Application Context.
|
||||
*/
|
||||
func ExtractCode(c *gin.Context) SecretCodeModel {
|
||||
secret := new(SecretCodeModel)
|
||||
|
||||
Reference in New Issue
Block a user