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

vweb: vfmt vweb.v

This commit is contained in:
Alexander Medvednikov 2021-01-03 17:03:18 +01:00
parent 443ae1d76e
commit 89bbbe0ec0

View File

@ -419,7 +419,7 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
} else { } else {
route_words_a = attrs.filter(it.to_lower() != 'get').map(it[1..].split('/')) route_words_a = attrs.filter(it.to_lower() != 'get').map(it[1..].split('/'))
} }
if attrs.len == 0 || (attrs.len == 1 && route_words_a.len == 0 ) { if attrs.len == 0 || (attrs.len == 1 && route_words_a.len == 0) {
// No routing for this method. If it matches, call it and finish matching // No routing for this method. If it matches, call it and finish matching
// since such methods have a priority. // since such methods have a priority.
// For example URL `/register` matches route `/:user`, but `fn register()` // For example URL `/register` matches route `/:user`, but `fn register()`