Added some docs
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/deploy unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details

pull/114/head
Jef Roosens 2022-04-01 21:50:00 +02:00
parent 3a6effad80
commit fe24774848
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 3 additions and 0 deletions

View File

@ -217,6 +217,7 @@ pub fn (mut ctx Context) send_response_to_client(mimetype string, res string) bo
return true return true
} }
// text responds to a request with some plaintext.
pub fn (mut ctx Context) text(status http.Status, s string) Result { pub fn (mut ctx Context) text(status http.Status, s string) Result {
ctx.status = status ctx.status = status
@ -307,6 +308,8 @@ pub fn (mut ctx Context) file(f_path string) Result {
return Result{} return Result{}
} }
// status responds with an empty textual response, essentially only returning
// the given status code.
pub fn (mut ctx Context) status(status http.Status) Result { pub fn (mut ctx Context) status(status http.Status) Result {
return ctx.text(status, '') return ctx.text(status, '')
} }