gitea/routers/api/v1
delvh 778ad795fd
Refactor deletion (#28610)
Introduce the new generic deletion methods
- `func DeleteByID[T any](ctx context.Context, id int64) (int64, error)`
- `func DeleteByIDs[T any](ctx context.Context, ids ...int64) error`
- `func Delete[T any](ctx context.Context, opts FindOptions) (int64,
error)`

So, we no longer need any specific deletion method and can just use
the generic ones instead.

Replacement of #28450

Closes #28450

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-12-25 21:25:29 +01:00
..
activitypub More refactoring of `db.DefaultContext` (#27083) 2023-09-15 06:13:19 +00:00
admin chore(api): support ignore password if login source type is LDAP for creating user API (#28491) 2023-12-19 02:32:45 +00:00
misc Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
notify Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
org Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
packages Another round of `db.DefaultContext` refactor (#27103) 2023-09-25 13:17:37 +00:00
repo Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
settings Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
swagger refactor(API): refactor secret creation and update functionality (#26751) 2023-08-28 13:08:19 +08:00
user Fix comment permissions (#28213) 2023-11-25 17:21:21 +00:00
utils Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
api.go Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00