Mercurial Hosting > disearch
comparison src/lib/Shared.luan @ 13:af2b95854072
add server records
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 30 Oct 2023 21:32:42 -0600 |
parents | 3e2cb946d511 |
children | 80105b716a62 |
comparison
equal
deleted
inserted
replaced
12:3e2cb946d511 | 13:af2b95854072 |
---|---|
2 local error = Luan.error | 2 local error = Luan.error |
3 local Time = require "luan:Time.luan" | 3 local Time = require "luan:Time.luan" |
4 local Parsers = require "luan:Parsers.luan" | 4 local Parsers = require "luan:Parsers.luan" |
5 local json_string = Parsers.json_string or error() | 5 local json_string = Parsers.json_string or error() |
6 local Http = require "luan:http/Http.luan" | 6 local Http = require "luan:http/Http.luan" |
7 local Utils = require "site:/lib/Utils.luan" | |
8 local get_user = Utils.get_user or error() | |
7 | 9 |
8 | 10 |
9 local Shared = {} | 11 local Shared = {} |
10 | 12 |
11 local started = Time.now() | 13 local started = Time.now() |
12 | |
13 local function get_user() | |
14 return Http.request.cookies.user | |
15 end | |
16 Shared.get_user = get_user | |
17 | 14 |
18 function Shared.head() | 15 function Shared.head() |
19 %> | 16 %> |
20 <meta name="viewport" content="width=device-width, initial-scale=1"> | 17 <meta name="viewport" content="width=device-width, initial-scale=1"> |
21 <style> | 18 <style> |