-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d904e21
commit bec6c1b
Showing
6 changed files
with
1,730 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ package server | |
import ( | ||
"github.com/GenerateNU/sac/backend/src/config" | ||
"github.com/GenerateNU/sac/backend/src/middleware" | ||
"github.com/GenerateNU/sac/backend/src/search" | ||
"github.com/GenerateNU/sac/backend/src/server/routes" | ||
"github.com/GenerateNU/sac/backend/src/services" | ||
"github.com/GenerateNU/sac/backend/src/utilities" | ||
|
@@ -23,7 +24,7 @@ import ( | |
// @contact.email [email protected] and [email protected] | ||
// @host 127.0.0.1:8080 | ||
// @BasePath / | ||
func Init(db *gorm.DB, settings config.Settings) *fiber.App { | ||
func Init(db *gorm.DB, pinecone *search.PineconeClient, settings config.Settings) *fiber.App { | ||
app := newFiberApp() | ||
|
||
validate, err := utilities.RegisterCustomValidators() | ||
|
@@ -47,7 +48,7 @@ func Init(db *gorm.DB, settings config.Settings) *fiber.App { | |
|
||
routes.Contact(apiv1, services.NewContactService(db, validate)) | ||
|
||
clubsIDRouter := routes.Club(apiv1, services.NewClubService(db, validate), middlewareService) | ||
clubsIDRouter := routes.Club(apiv1, services.NewClubService(db, pinecone, validate), middlewareService) | ||
routes.ClubTag(clubsIDRouter, services.NewClubTagService(db, validate)) | ||
routes.ClubFollower(clubsIDRouter, services.NewClubFollowerService(db)) | ||
routes.ClubMember(clubsIDRouter, services.NewClubMemberService(db, validate)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters