Skip to content

Commit 710a473

Browse files
committed
refactor: remove unnecessary deployment section from README and update challenge filtering to consider IST timezone
1 parent e03b4af commit 710a473

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -163,31 +163,6 @@ We welcome contributions from the community! Here's how you can help:
163163
4. **Testing**: Ensure your changes work correctly
164164
5. **Pull Request**: Submit with clear description
165165

166-
## Deployment
167-
168-
The project uses automated CI/CD pipelines:
169-
170-
### Frontend Deployment
171-
- **Platform**: Cloudflare Pages
172-
- **Trigger**: Push to `main` branch
173-
- **Build Command**: `npm run build`
174-
- **Output Directory**: `dist`
175-
176-
### Backend Deployment
177-
- **Platform**: Custom server deployment
178-
- **Trigger**: Push to `main` branch
179-
- **Environment**: Production environment variables
180-
181-
### CI/CD Pipeline
182-
- Automatic testing and linting
183-
- Build verification
184-
- Deployment to production
185-
- Environment-specific configurations
186-
187-
## License
188-
189-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
190-
191166
## Acknowledgments
192167

193168
- **SRKR Coding Club** - For the initiative and support

server/controllers/challengeController.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ export const getChallenges = async (req, res) => {
7272
const sortObj = {};
7373
sortObj[sortBy] = sortOrder === 'desc' ? -1 : 1;
7474

75+
const now = new Date();
76+
const istOffset = 5.5 * 60 * 60 * 1000; // IST is UTC+5:30
77+
const istNow = new Date(now.getTime() + istOffset);
78+
79+
const today = new Date(istNow);
80+
today.setHours(0, 0, 0, 0);
81+
82+
const todayUTC = new Date(today.getTime() - istOffset);
83+
filter.createdAt = { $lt: todayUTC };
84+
85+
7586
const challenges = await Challenge.find(filter)
7687
.limit(limit)
7788
.skip(startIndex)

0 commit comments

Comments
 (0)