mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Rename context.Query to context.Form (#16562)
This commit is contained in:
@@ -171,7 +171,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
|
||||
// "$ref": "#/responses/empty"
|
||||
|
||||
lastRead := int64(0)
|
||||
qLastRead := strings.Trim(ctx.Query("last_read_at"), " ")
|
||||
qLastRead := strings.Trim(ctx.Form("last_read_at"), " ")
|
||||
if len(qLastRead) > 0 {
|
||||
tmpLastRead, err := time.Parse(time.RFC3339, qLastRead)
|
||||
if err != nil {
|
||||
@@ -189,8 +189,8 @@ func ReadRepoNotifications(ctx *context.APIContext) {
|
||||
UpdatedBeforeUnix: lastRead,
|
||||
}
|
||||
|
||||
if !ctx.QueryBool("all") {
|
||||
statuses := ctx.QueryStrings("status-types")
|
||||
if !ctx.FormBool("all") {
|
||||
statuses := ctx.FormStrings("status-types")
|
||||
opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread"})
|
||||
log.Error("%v", opts.Status)
|
||||
}
|
||||
@@ -200,7 +200,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
targetStatus := statusStringToNotificationStatus(ctx.Query("to-status"))
|
||||
targetStatus := statusStringToNotificationStatus(ctx.Form("to-status"))
|
||||
if targetStatus == 0 {
|
||||
targetStatus = models.NotificationStatusRead
|
||||
}
|
||||
|
Reference in New Issue
Block a user