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

vweb: add a vweb_global attribute (#12064)

This commit is contained in:
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

View File

@ -377,7 +377,7 @@ pub fn run<T>(global_app &T, port int) {
// println('vweb no db')
}
$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)
}
}