vweb: add a `vweb_global` attribute (#12064)

pull/12154/head
Anton Zavodchikov 2021-10-12 06:35:36 +03:00 committed by GitHub
parent 5eba02ea94
commit 4d7bb95c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ pub fn run<T>(global_app &T, port int) {
// println('vweb no db') // println('vweb no db')
} }
$for field in T.fields { $for field in T.fields {
if field.is_shared { if 'vweb_global' in field.attrs || field.is_shared {
request_app.$(field.name) = global_app.$(field.name) request_app.$(field.name) = global_app.$(field.name)
} }
} }