This repository was archived by the owner on Sep 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @cstleagueorg/cs2-blog-scraper" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "description" : " " ,
55 "main" : " dist/src/index.js" ,
66 "scripts" : {
1010 "format" : " prettier --write \" src/**/*.ts\" \" src/**/*.js\" " ,
1111 "lint" : " eslint ." ,
1212 "prepare" : " npm run build" ,
13- "prepublishOnly" : " npm test && npm run lint" ,
1413 "preversion" : " npm run lint" ,
1514 "version" : " npm run format && git add -A src" ,
1615 "postversion" : " git push && git push --tags"
2625 " csgo" ,
2726 " node-fetch"
2827 ],
29- "author" : " Ta1al " ,
28+ "author" : " Sergey Zhirov <polarwolf@cstl.gg> " ,
3029 "license" : " ISC" ,
3130 "devDependencies" : {
3231 "@types/jest" : " ^29.2.3" ,
Original file line number Diff line number Diff line change @@ -92,12 +92,13 @@ export class UpdatesListener {
9292 this . callback = callback
9393 // eslint-disable-next-line @typescript-eslint/no-misused-promises
9494 this . intervalId = setInterval ( this . fetchPosts , interval )
95+ void this . fetchPosts ( )
9596 }
9697
9798 async fetchPosts ( ) : Promise < void > {
9899 const posts = await getPosts ( undefined , this . params )
99100 posts . reverse ( ) . forEach ( post => {
100- if ( post . date . getTime ( ) > this . lastPostTime ) {
101+ if ( post . date . getTime ( ) <= this . lastPostTime ) {
101102 return
102103 }
103104 this . callback ( post )
You can’t perform that action at this time.
0 commit comments