matheusgomes28 / urchin

Headless CMS written in Golang
MIT License
60 stars 19 forks source link

Add Pagination #44 #50

Closed Ali-Assar closed 5 months ago

Ali-Assar commented 6 months ago

Here is the things I've done for pagination:

I edited the database query to support pagination Then I saw home handler use GetPosts so i modified that handler in app.go and at the end I Changed SetupRoutes in app.go

matheusgomes28 commented 6 months ago

Thanks @Ali-Assar I'll take a look after work today! Note that the pipeline is failing, think you need to run gofmt on all files

matheusgomes28 commented 5 months ago

Also, don't forget to run gofmt -w . from the project root to go format everything before pushing.

matheusgomes28 commented 5 months ago

@Ali-Assar please don't reopen another PR, just use this one. I can't accept multiple PRs!

Ali-Assar commented 5 months ago

thanks for your help I have implemented your wanted changes. Thanks for your help. Now all the test would be working fine.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 24.96%. Comparing base (79e6602) to head (74da431).

Files Patch % Lines
app/app.go 75.00% 2 Missing and 2 partials :warning:
database/database.go 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #50 +/- ## ========================================== + Coverage 23.83% 24.96% +1.12% ========================================== Files 14 14 Lines 646 661 +15 ========================================== + Hits 154 165 +11 - Misses 475 477 +2 - Partials 17 19 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Ali-Assar commented 5 months ago

I see your point so I changed the code as requested. Please let me know if you need any other changes.

Ali-Assar commented 5 months ago

Thanks for your help I've learn a lot. also i want to use this opportunity and in advance wish you a happy Nowruz which is the Persian New Year. Nowruz marks the beginning of spring and symbolizes renewal, hope, and new beginnings. 🌸🌼

matheusgomes28 commented 5 months ago

Thank you for the wishes @Ali-Assar! Happy Nowruz to you too, my friend. This is the nicest Github message I've received, so thank you!

I hope to see more contributions from you here at Urchin, been a pleasure reviewing your code 🤝