forked from forgejo/forgejo
[MODERATION] add user blocking API
- Follow up for: #540, #802 - Add API routes for user blocking from user and organization perspective. - The new routes have integration testing. - The new model functions have unit tests. - Actually quite boring to write and to read this pull request. (cherry picked from commitf3afaf15c7
) (cherry picked from commit6d754db3e5
) (cherry picked from commit2a89ddc0ac
) (cherry picked from commit4a147bff7e
) Conflicts: routers/api/v1/api.go templates/swagger/v1_json.tmpl
This commit is contained in:
parent
eff5b43d2e
commit
bb8c339185
12 changed files with 626 additions and 9 deletions
13
modules/structs/moderation.go
Normal file
13
modules/structs/moderation.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2023 The Forgejo Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package structs
|
||||
|
||||
import "time"
|
||||
|
||||
// BlockedUser represents a blocked user.
|
||||
type BlockedUser struct {
|
||||
BlockID int64 `json:"block_id"`
|
||||
// swagger:strfmt date-time
|
||||
Created time.Time `json:"created_at"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue