formatted them with fmt
This commit is contained in:
@@ -64,7 +64,7 @@ func GetMovie() gin.HandlerFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddMovie() gin.HandlersChain {
|
func AddMovie() gin.HandlerFunc {
|
||||||
return func(c *gin.Context) {
|
return func(c *gin.Context) {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@@ -89,4 +89,4 @@ func AddMovie() gin.HandlersChain {
|
|||||||
|
|
||||||
c.JSON(http.StatusCreated, result)
|
c.JSON(http.StatusCreated, result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"go.mongodb.org/mongo-driver/v2/mongo"
|
"go.mongodb.org/mongo-driver/v2/mongo"
|
||||||
"go.mongodb.org/mongo-driver/v2/mongo/options"
|
"go.mongodb.org/mongo-driver/v2/mongo/options"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Connect() *mongo.Client {
|
func Connect() *mongo.Client {
|
||||||
|
|||||||
Reference in New Issue
Block a user