summaryrefslogtreecommitdiffstats
path: root/api4/params.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/params.go')
-rw-r--r--api4/params.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/api4/params.go b/api4/params.go
index 785b2267b..aa865fd2a 100644
--- a/api4/params.go
+++ b/api4/params.go
@@ -35,6 +35,8 @@ type ApiParams struct {
EmojiName string
Category string
Service string
+ JobId string
+ JobType string
Page int
PerPage int
}
@@ -116,6 +118,14 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams {
params.EmojiName = val
}
+ if val, ok := props["job_id"]; ok {
+ params.JobId = val
+ }
+
+ if val, ok := props["job_type"]; ok {
+ params.JobType = val
+ }
+
if val, err := strconv.Atoi(r.URL.Query().Get("page")); err != nil || val < 0 {
params.Page = PAGE_DEFAULT
} else {