Skip to content

Commit

Permalink
add a week delay for artist highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Leouarz committed Feb 28, 2022
1 parent b4916a9 commit ad71d4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/services/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class UserService {
// get last timestamp from db
const lastArtistHighlight = await ArtistHighlightModel.findOne({}, {}, {sort: {timestamp: -1}});
// if timestamp is less than 7 days ago, return artist
if (lastArtistHighlight && (+new Date() - +lastArtistHighlight.timestamp < /*7 * 24 * 3600 * 1000*/20000)){
if (lastArtistHighlight && (+new Date() - +lastArtistHighlight.timestamp < 7 * 24 * 3600 * 1000)){
return await this.findUser({id: lastArtistHighlight.walletId});
}else{
let artist = null
Expand Down

0 comments on commit ad71d4e

Please sign in to comment.