Skip to content

Commit

Permalink
Add success response
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrel-b committed Aug 26, 2023
1 parent d1b21ff commit 876b94e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions emails/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ func processAddToMailingList(queries *coredb.Queries) gin.HandlerFunc {
util.ErrResponse(c, http.StatusInternalServerError, err)
return
}

c.JSON(http.StatusOK, util.SuccessResponse{Success: true})
}
}

Expand Down
13 changes: 6 additions & 7 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ func Init() {

ctx := context.Background()
c := ClientInit(ctx)
// XXX provider, _ := NewMultichainProvider(ctx, SetDefaults)
// XXX recommender := recommend.NewRecommender(c.Queries)
// XXX p := userpref.NewPersonalization(ctx, c.Queries, c.StorageClient)
// XXX router := CoreInit(ctx, c, provider, recommender, p)
router := CoreInit(ctx, c, nil, nil, nil)
provider, _ := NewMultichainProvider(ctx, SetDefaults)
recommender := recommend.NewRecommender(c.Queries)
p := userpref.NewPersonalization(ctx, c.Queries, c.StorageClient)
router := CoreInit(ctx, c, provider, recommender, p)
http.Handle("/", router)
}

Expand Down Expand Up @@ -130,8 +129,8 @@ func CoreInit(ctx context.Context, c *Clients, provider *multichain.Provider, re
socialCache := redis.NewCache(redis.SocialCache)
authRefreshCache := redis.NewCache(redis.AuthTokenForceRefreshCache)

// recommender.Loop(ctx, time.NewTicker(time.Hour))
// p.Loop(ctx, time.NewTicker(time.Minute*15))
recommender.Loop(ctx, time.NewTicker(time.Hour))
p.Loop(ctx, time.NewTicker(time.Minute*15))

return handlersInit(router, c.Repos, c.Queries, c.EthClient, c.IPFSClient, c.ArweaveClient, c.StorageClient, provider, newThrottler(), c.TaskClient, c.PubSubClient, lock, c.SecretClient, graphqlAPQCache, feedCache, socialCache, authRefreshCache, c.MagicLinkClient, recommender, p)
}
Expand Down

0 comments on commit 876b94e

Please sign in to comment.