Commit graph

3 commits

Author SHA1 Message Date
Dessalines
9250460b11
Add endpoint to get Liked / Disliked comments and posts. (#5616)
* migration

* update code

* tests

* triggers

* fix

* fmt

* clippy

* post aggregate migration

* changes for post aggregate code

* wip: update tests for post aggregate

* format

* fix partialeq

* trigger fix

* fix post insert trigger

* wip

* reorder

* fixes

* community aggregate migration

* update code

* triggers

* person aggregate migration

* person aggregate code

* person triggers

* test fixes

* fix scheduled task

* update api tests

* site_aggregates to local_site migration

* site_aggregates code changes

* triggers, tests

* more fixes

* Rename PersonPostAggregates to PostActions

* Merge local_user_vote_display_mode into local_user

* fix schema

* Extracting pagination cursor utils into a trait.

- Fixes #5275

* Refactoring to avoid stack overflows.

* Fixing api_common feature.

* Adding pagination for GetBannedPersons.

- Must come after #5424
- Fixes #2847

* Starting to work on removing rest of page / limit.

* Issues with community pagination.

* Rename the traits and paginationcursor::new

* remove duplicate fields

* remove "aggregates" from index names

* uncomment indices

* if count = 0

* Using combined trait.

* remove commentaggregates

* Fix triggers in remove aggregates tables pr (#5451)

* prevent all db_schema test errors

* fix the delete_comments_before_post problem in a way that doesn't affect the returned number of affected rows

* remove unnecessary recursion checks and add comment to remaining check

* clean up

* Fixing SQL format.

* Update triggers.sql

* Update triggers.sql

* Update triggers.sql

* Update triggers.sql

* remove update of deleted column

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>

* rename migration

* Fix migration errors

* Move community.hidden to visibility (fixes #5458)

* Removing empty files.

* Fixing person_saved_combined. (#5481)

* Remove comment and post specific action structs. #5473

* Doing reports

* fix up migration by dropping index

* also add enum variant `LocalOnlyPublic`, rename `LocalOnly` to `LocalOnlyPrivate`

fixes #5351

* fix column order in down.sql

* wip

* Moving blocks.

* Adding a few more views.

* more wip

* fixes

* migration for modlog

* fix migration

* Working views and schema.

* Fix ts_optionals.

* wip

* db_schema compiling

* make the code compile

* Merging from main.

* lint

* Fixing SQL format.

* fix down migration

* Fixing api tests.

* Adding field comments for the actions tables.

* Refactoring CommunityFollower to include follow_state

* fix test

* make hidden status federate

* ts attr

* fix

* fix api test

* Update crates/api/src/reports/post_report/resolve.rs

Co-authored-by: Nutomic <me@nutomic.com>

* Addressing PR comments

* Fix ts export.

* update api client

* review

* Extracting filter_not_hidden_or_is_subscribed (#5497)

* Extracting filter_not_hidden_or_is_subscribed

* Cleanup.

* Cleanup 2.

* Remove follower_state_helper function.

* Cleaning up some utils functions.

* rename hidden to unlisted

* Updating lemmy-js-client.

* Fixing a few cases.

* Fixing list_banned.

* Starting to convert to lemmy results.

* Fixing vote_view.

* Close to finishing up errors.

* Got compiling.

* Remove tracing for CI.

* Removing unused errors.

* Fixing merge from main.

* lower_name community_view sort.

* Syntax errors.

* Removing rest of Result from db_schema, db_views.

* Finally compiling again.

* fmt.

* Subpath tries again.

* Adding some more indexes./

* Fixing shear.

* Fix keyword_blocks test.

* @dullbananas fixes to Subpath, fixing comment tests.

* sql fmt

* Fixing unused error.

* API test fixing

* Moving read_only_posts to its own endpoint, sorted by read date.

- Fixes #5505

* Adding endpoint to list hidden posts.

- Fixes #5607

* Adding a first_id helper function.

* Fixing api_common

* Adding a person/liked endpoint for posts and comments.

- Fixes #4499

* Get rid of old liked_only filters.

* Formatting sql.

* Clippy

* Fixing view tests.

* SQL fmt

* Addressing PR comments

* Addressing PR comments 1.

* Using id desc.

* Addressing PR comments 2.

* Removing the reverse_timestamp keys for the post table.

* Make community_title and community_lower_name indexes desc

* Remove featured_community from post sort

* Forgot to drop index.

* Addressing PR comments

* Fixing clippy.

* Adding person_local column to post_actions and comment_actions

* Fixing pg_format

* Fixing pg_format 2

* Revert "Adding person_local column to post_actions and comment_actions"

This reverts commit e5145d8b07.

* Adding local person check to liked and saved combined.

* Formatting sql.

* Adding local check to migration.

* Addressing PR comments

* Try to add versioned pg_formatter 1

* Try to add versioned pg_formatter 2

* Try to add versioned pg_formatter 3

* Try to add versioned pg_formatter 4

* Moving back to correct location.

---------

Co-authored-by: Felix Ableitner <me@nutomic.com>
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-06-02 11:15:27 +02:00
Dessalines
be1389420b
Adding SQL format checking via pg_format / pgFormatter (#3740)
* SQL format checking, 1.

* SQL format checking, 2.

* SQL format checking, 3.

* SQL format checking, 4.

* SQL format checking, 5.

* Running pg_format

* Getting rid of comment.

* Upping pg_format version.

* Using git ls-files for sql format check.

* Fixing sql lints.

* Addressing PR comments.
2023-08-02 12:44:51 -04:00
Felix Ableitner
99abc49040 Add /activities endpoint (ref #1220) 2020-10-26 12:54:27 +01:00