Mercurial Hosting > hghosting
comparison src/admin/add.html.luan @ 23:7c9a45368af2 default tip
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 04 Oct 2024 12:06:16 -0600 |
parents | b14073ab9d07 |
children |
comparison
equal
deleted
inserted
replaced
22:e65668ff8822 | 23:7c9a45368af2 |
---|---|
14 local name_regex = String.regex("^[a-z0-9_][a-z0-9_-]*$") | 14 local name_regex = String.regex("^[a-z0-9_][a-z0-9_-]*$") |
15 | 15 |
16 local function handle() | 16 local function handle() |
17 local user = get_user() | 17 local user = get_user() |
18 local repo_name = Http.request.parameters.repo or error() | 18 local repo_name = Http.request.parameters.repo or error() |
19 name_regex.matches( repo_name ) or error "invalid regex name" | 19 name_regex.matches( repo_name ) or error "invalid repo name" |
20 if repo_name=="_all" or repo_name=="_private" then | 20 if repo_name=="_all" or repo_name=="_private" then |
21 return [[<p error>Invalid rep name</p>]] | 21 return [[<p error>Invalid rep name</p>]] |
22 end | 22 end |
23 local raw_config = get_raw_config() | 23 local raw_config = get_raw_config() |
24 if raw_config.repos[repo_name] ~= nil then | 24 if raw_config.repos[repo_name] ~= nil then |