change to use logging instead of print to stdout
This commit is contained in:
@@ -3,7 +3,7 @@ package controllers
|
||||
import (
|
||||
"ccsecrets/models"
|
||||
"ccsecrets/utils/token"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -22,7 +22,7 @@ func RetrieveSecret(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
fmt.Printf("RetrieveSecret received JSON input '%v'\n", input)
|
||||
log.Printf("RetrieveSecret received JSON input '%v'\n", input)
|
||||
|
||||
// Get the user and role id of the requestor
|
||||
user_id, err := token.ExtractTokenID(c)
|
||||
@@ -72,7 +72,7 @@ func RetrieveMultpleSecrets(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
fmt.Printf("StoreSecret received JSON input '%v'\n", input)
|
||||
log.Printf("StoreSecret received JSON input '%v'\n", input)
|
||||
|
||||
// Get the user and role id of the requestor
|
||||
user_id, err := token.ExtractTokenID(c)
|
||||
|
Reference in New Issue
Block a user