Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
chore: update DI
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-goldenowl committed Apr 23, 2023
1 parent d985f18 commit 8a405ee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions infras/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
package infras

import (
controllers2 "github.com/GoldenOwlAsia/golang-api-template/handlers"
"github.com/GoldenOwlAsia/golang-api-template/handlers"
"github.com/GoldenOwlAsia/golang-api-template/services"
"github.com/google/wire"
"gorm.io/gorm"
)

func InitUserAPI(db *gorm.DB) controllers2.UserHandler {
func InitUserAPI(db *gorm.DB) handlers.UserHandler {
wire.Build(
services.NewUserService,
controllers2.NewUserHandler,
handlers.NewUserHandler,
)

return controllers2.UserHandler{}
return handlers.UserHandler{}
}

func InitArticleAPI(db *gorm.DB) controllers2.ArticleHandler {
func InitArticleAPI(db *gorm.DB) handlers.ArticleHandler {
wire.Build(
services.NewArticleService,
controllers2.NewArticleHandler,
handlers.NewArticleHandler,
)

return controllers2.ArticleHandler{}
return handlers.ArticleHandler{}
}

0 comments on commit 8a405ee

Please sign in to comment.