Commit Graph

21 Commits (52155c74cb82f3252937e0fb799af079b0b9e2ce)

Author SHA1 Message Date
Dessalines 52155c74cb
View report history for a post or comment. Fixes #4190 (#4492) 3 months ago
SleeplessOne1917 300869d397
Make request models derive PartialEq, Eq, and Hash (#4443)
* Make request models derive PartialEq, Eq, and Hash

* Fix clippy error

---------

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
4 months ago
Dessalines 009a45dffb
Adding /post/like/list and /comment/like/list for admins. (#4332)
- Allows admins to view likes, sorted by downvotes first,
  for a given comment or post.
- Fixes #4088
5 months ago
Nutomic f858d8cbce
Remove explicit auth params (#3946)
* Remove explicit auth params (ref #3725)

Only take auth via header or cookie. This requires a new version
of lemmy-js-client for api tests to pass.

* rework api_crud

* remove remaining auth params, move logic to session middleware

* fmt, fix test

* update js client

* remove auth param from api tests

* Pass auth as header

* add !

* url vars, setHeader

* cleanup

* fmt

* update

* Updating for new lemmy-js-client.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Piotr Juszczyk 2ad3450004
Allow filtering posts and comments by whether they were liked/disliked - fixes #3401 (#3523)
* Allow filtering posts and comments by whether they were liked/disliked

* Switch to 2 args - liked_only, disliked_only - taking bools

* Make liked_only and disliked_only Option<bool>

* Fix unrelated is_profile_view compilation error
10 months ago
Nutomic 2bb24c2859
Remove form_id params (#3812) 10 months ago
Dessalines 014c0ad87f
Adding comments to all API related types. Fixes #2846 (#2848) 1 year ago
Dessalines 88a0d2feec
Adding typescript generation for API. Fixes #2824 (#2827)
* Adding typescript generation for API. Fixes #2824

* Try to fix Ltree issue 1.

* Forgot a few types.

* Fixing api tests.

* Removing url_serde line.

* Manually deriving TS for some types.
1 year ago
Dessalines 1917e3d495
Separate comment distinguish (#2740)
* Combine prod and dev docker setups using build-arg

- Fixes #2603

* Dont use cache for release build.

* Separate comment distinguish into its own action.

- Fixes #2708

---------

Co-authored-by: Nutomic <me@nutomic.com>
1 year ago
Felix Ableitner d058e2217a api changes for comment language tagging 2 years ago
Dessalines 870abf8442
Adding distinguish comment. Fixes #2002 (#2391)
* Adding distinguish comment. Fixes #2002

* Adding lemmy:distinguished
2 years ago
Dessalines 9c3efe32e7
First pass at adding comment trees. (#2362)
* First pass at adding comment trees.

- Extracted comment replies into its own table.
- Added ltree column to comment
- Added parent_id param to GetComments to fetch a tree branch
- No paging / limiting yet

* Adding child_count to comment_aggregates.

* Adding parent comment update counts

* Fix unit tests.

* Comment tree paging mostly done.

* Fix clippy

* Fix drone tests wrong postgres version.

* Fix unit tests.

* Add back in delete in unit test.

* Add postgres upgrade script.

* Fixing some PR comments.

* Move update ltree into Comment::create

* Updating based on comments.

* Fix send soft fail.
2 years ago
Nutomic 3053e14be7
Derive default for api request structs, move type enums (#2245)
* Derive default for api request structs, move type enums

* Simplify api by using enum types directly, instead of string

* Add default and clone for most api structs
2 years ago
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2 years ago
Riley 35cbae61bc
Don't drop error context when adding a message to errors (#1958)
* Respond directly with LemmyError

Instrument Perform implementations for more precise traces
Use ApiError to format JSON errors when messages are present
Keep SpanTrace output in LemmyError Display impl

* Hide SpanTrace debug output from LemmyError

* Don't log when entering spans, only when leaving

* Update actix-web

* Update actix-rt

* Add newline after error info in LemmyError Display impl

* Propogate span information to blocking operations

* Instrument apub functions

* Use skip_all for more instrument attributes, don't skip 'self' in some api actions

* Make message a static string

* Send proper JSON over websocket

* Add 'message' to LemmyError display if present

* Use a quieter root span builder, don't pretty-print logs

* Keep passwords and emails out of logs

* Re-enable logging Login

* Instrument feeds

* Emit our own errors

* Move error log after status code recording

* Make Sensitive generic over the inner type

* Remove line that logged secrets
3 years ago
Dessalines d2e28e5f38
Adding a GetComment endpoint. Fixes #1919 (#1944) 3 years ago
Felix Ableitner f24999027e Merge crates db_schema and db_queries 3 years ago
Tmpod aef9786fa7
Add both (De)Serialize to all models (#1851) 3 years ago
Dessalines b18c744f63
Clean up reporting (#1776)
* First untested pass at reporting.

* Adding unit tests for post and comment report views

* Fix clippy

* Adding counts, creator_banned, and unresolved_only

* Adding my_vote to report views

* Fixing unit tests.
3 years ago
Dessalines f8cd6fd445 Making more fields optional in the API.
- Fixes #1569
3 years ago
Felix Ableitner 249fcc5066 Split api crate into api_structs and api 3 years ago