diff src/admin/index.html.luan @ 4:028e74c8889d

add all_users
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 12 May 2022 16:54:11 -0600
parents dfc36e7ed22c
children a7187a447835
line wrap: on
line diff
--- a/src/admin/index.html.luan	Thu May 12 10:26:43 2022 -0600
+++ b/src/admin/index.html.luan	Thu May 12 16:54:11 2022 -0600
@@ -1,6 +1,5 @@
 local Luan = require "luan:Luan.luan"
 local error = Luan.error
-local pairs = Luan.pairs or error()
 local ipairs = Luan.ipairs or error()
 local Io = require "luan:Io.luan"
 local Http = require "luan:http/Http.luan"
@@ -9,19 +8,8 @@
 local header = Shared.admin_header or error()
 local get_user = Shared.get_user or error()
 local config = Shared.config or error()
-
+local user_repos = Shared.user_repos or error()
 
-local user_repos = {}
-for _, repo in pairs(config.repos) do
-	for user in pairs(repo.users) do
-		local repos = user_repos[user]
-		if repos == nil then
-			repos = {}
-			user_repos[user] = repos
-		end
-		repos[#repos+1] = repo
-	end
-end
 
 return function()
 	local user = get_user()