1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: update references to old .init_once() and .init() methods to .init_server() and .before_request()

This commit is contained in:
Delyan Angelov
2021-04-26 19:38:13 +03:00
parent 5e0ff5c524
commit cafe382424
5 changed files with 6 additions and 19 deletions

View File

@ -91,7 +91,7 @@ mut:
struct WebhookServer {
vweb.Context
mut:
gen_vc &GenVC = 0 // initialized in init_once
gen_vc &GenVC = 0 // initialized in init_server
}
// storage for flag options
@ -156,12 +156,6 @@ pub fn (mut ws WebhookServer) init_server() {
// ws.gen_vc = new_gen_vc(flag_options)
}
/*
pub fn (mut ws WebhookServer) init() {
// ws.init_once()
}
*/
pub fn (mut ws WebhookServer) index() {
eprintln('WebhookServer.index() called')
}
@ -198,7 +192,6 @@ fn parse_flags(mut fp flag.FlagParser) FlagOptions {
}
}
// init
fn (mut gen_vc GenVC) init() {
// purge repos if flag is passed
if gen_vc.options.purge {