1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-24 22:42:46 +01:00
Commit Graph

80 Commits

Author SHA1 Message Date
Paul Tirk
da5e749ecc rename parameter for read/unread api call
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
3bdafbfcea add documentation for API v1.3 & fix parameter description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
4b68169142 also allow starring/unstarring multiple items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
115df4b9e2 remove duplicate function
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
b9c4f0bacb fix indentation of function description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
98028e4422 add routes for starring/unstarring items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Benjamin Brahmer
c49e0fb4f4 rename maxItemId to newestItemId to match docs
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-03-18 11:54:02 +01:00
Benjamin Brahmer
78bc3321b9 Fix only one item marked as read by Feed API
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-03-08 13:05:15 +01:00
Sean Molenaar
469807a091 Chore: implement removals from #935
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-06-01 11:23:04 +02:00
Sean Molenaar
2159eccbf1 controller: getRead + all_items is now unread type
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-05-27 19:10:53 +02:00
Marco Nassabain
1a5ca74172 Add sharer display name into shared items
- Add mapSharedByDisplayNames in ShareService
- Update ItemController to call function on items

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
mnassabain
7f21574615 🎨 Type hint ItemController share function
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
2cba1e4146 🧹 Cleanup code, remove spaces, rename variables
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
1a582f2a7a 🚑 Fix ItemController::share
- call correct ShareService function
- correct ShareService className annotation

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
409c835433 🩹 Patch ItemController + test to use ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
9bd27da9ba 🔥 Remove old share item logic & functions
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
604f64c30c 🚨 Fix linter in those classes:
- ItemController
- ItemMapperV2
- ItemServicev2

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
08982fc540 Add findAllSharedAfter
- adapted Controller, Service and Mapper (newItems)

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
0f6ec7c99c Implementer shared getter + add count in request
- ItemServiceV2: added sharedWithUser - returns unread shared items
- ItemController & FeedController - returning shared count

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
7e1a0b47cf ItemController (index): add case for shared items
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
907e764749 🚧 ItemService, Controller: added basic sharing
- TODO: check if relation already exists

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
54aa8b5270 🩹 Return starredCount in newItems response params
- returning sharedCount everywhere where starredCount is returned

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
bf92ace3e8 🐛 Added sharedCount to feedController index resp.
- After reloading news app, the shared menu count wouldn't update
- The number would only update on click (call ItemController index)
- Adding it here fixes the issue

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
5f69c256e3 Add function for avoid duplicate item (share)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
27ca98136a ItemController: return sharedCount in index req
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
08171bb42d NewsItem: add share routes + controller func
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Paul Tirk
f18adeba26 fix invalid 'empty' checks
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
f358c8213b add missing type hints
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
8b3c1341e8 return error if new folder name is missing on update
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
b45426937e return error if no folder name is provided
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
d4ace06ff5 add json error response without an exception
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
05b7ed7994 remove unused service exceptions & allow equally named folders
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
0d7d3cdfb4 move v2 api responses into existing php traits
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
dff855fba5 change method names to follow nextcloud convention
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
323f215e3a separate serialization functions
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
eb849a9be5 do not return existing folders when an API request error occurs
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
566a21b4a8 add possibility to serialize a reduced version of an entity
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
06a45387ef lint & add missing copyright/author information
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
5e4c927017 add folder api v2
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
2a2d7194ee add api v2 response trait
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
cc9c64d69b add api version 2 & folder api routes
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
skiingwiz
04519388ce Allow directly adding a feed without going through the discovery process
Signed-off-by: skiingwiz <skiingwiz@gmail.com>
2021-04-02 11:15:17 +02:00
Sean Molenaar
2baa7a2b91 Make PHPstan stricter
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-25 18:47:38 +01:00
Sean Molenaar
4e4108aaf8 Feed: Fix rename moving file
Issue #1181

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-23 15:06:02 +01:00
Sean Molenaar
4a107b3d53 General: Fix folder query
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-20 13:57:09 +01:00
Sean Molenaar
b4fa772bc5 Remove V1 item API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-13 13:22:57 +01:00
Sean Molenaar
66b4005b5e Controllers: Export Starred or unread instead of and
Fixes GH-1010

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-02 16:07:38 +01:00
Sean Molenaar
cb10dd1d83 Base: Update psalm definition and dependency list
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-26 16:06:47 +01:00
Sean Molenaar
582c4d11fa Controllers: Fetch feed after creating
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-18 20:15:13 +01:00
anoy
c67feb8d8d fix TypeError caused by type conversion in controller
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-17 17:56:37 +01:00