tangled
alpha
login
or
join now
8bit.lol
/
pegasus
forked from
futur.blue/pegasus
0
fork
atom
objective categorical abstract machine language personal data server
0
fork
atom
overview
issues
pulls
pipelines
Formatting
futur.blue
3 months ago
5b1e50b2
f104bf0c
verified
This commit was signed with the committer's
known signature
.
futur.blue
SSH Key Fingerprint:
SHA256:QHGqHWNpqYyw9bt8KmPuJIyeZX9SZewBZ0PR1COtKQ0=
+37
-13
5 changed files
expand all
collapse all
unified
split
dune
frontend
client
dune
pegasus
lib
api
oauth_
authorize.ml
server
createAccount.ml
util.ml
+23
-4
dune
···
45
45
(file ../public/client.js)
46
46
(file ../public/index.css)
47
47
(source_tree ../public/fonts))
48
48
-
(action (with-stdout-to %{null}
49
49
-
(run ocaml-crunch -e woff -e woff2 -e js -e css -m plain ../public -o %{target})))))
48
48
+
(action
49
49
+
(with-stdout-to
50
50
+
%{null}
51
51
+
(run
52
52
+
ocaml-crunch
53
53
+
-e
54
54
+
woff
55
55
+
-e
56
56
+
woff2
57
57
+
-e
58
58
+
js
59
59
+
-e
60
60
+
css
61
61
+
-m
62
62
+
plain
63
63
+
../public
64
64
+
-o
65
65
+
%{target})))))
66
66
+
50
67
(subdir
51
68
pegasus/lib/migrations/
52
69
(rule
53
70
(target migrations_sql.ml)
54
71
(deps
55
72
(source_tree .))
56
56
-
(action (with-stdout-to %{null}
57
57
-
(run ocaml-crunch -e sql -m plain . -o %{target})))))
73
73
+
(action
74
74
+
(with-stdout-to
75
75
+
%{null}
76
76
+
(run ocaml-crunch -e sql -m plain . -o %{target})))))
+4
-1
frontend/client/dune
···
9
9
server-reason-react.url_js)
10
10
(preprocess
11
11
(pps
12
12
-
server-reason-react.browser_ppx -js
12
12
+
server-reason-react.browser_ppx
13
13
+
-js
13
14
melange.ppx
14
15
melange-json.ppx
15
16
reason-react-ppx)))
···
17
18
(include_subdirs qualified)
18
19
19
20
(copy_files# "../src/components/*.mlx")
21
21
+
20
22
(copy_files# "../src/icons/*.mlx")
23
23
+
21
24
(copy_files# "../src/templates/*.mlx")
+2
-1
pegasus/lib/api/oauth_/authorize.ml
···
96
96
List.find_opt
97
97
(fun (user : Frontend.OauthAuthorizePage.actor) ->
98
98
user.did = did )
99
99
-
logged_in_users |> Option.value ~default:(List.hd logged_in_users)
99
99
+
logged_in_users
100
100
+
|> Option.value ~default:(List.hd logged_in_users)
100
101
in
101
102
Util.render_html ~title:("Authorizing " ^ host)
102
103
(module Frontend.OauthAuthorizePage)
+1
-1
pegasus/lib/api/server/createAccount.ml
···
38
38
| Ok _ ->
39
39
()
40
40
| Error e ->
41
41
-
Errors.invalid_request ~name:"InvalidHandle" e
41
41
+
Errors.invalid_request ~name:"InvalidHandle" e
42
42
in
43
43
let%lwt () =
44
44
match%lwt
+7
-6
pegasus/lib/util.ml
···
280
280
List.fold_left
281
281
(fun acc (_, value) ->
282
282
match value with
283
283
-
| `BlobRef blob -> blob :: acc
284
284
-
| `LexMap map -> (find_blob_refs map) @ acc
285
285
-
| _ -> acc )
283
283
+
| `BlobRef blob ->
284
284
+
blob :: acc
285
285
+
| `LexMap map ->
286
286
+
find_blob_refs map @ acc
287
287
+
| _ ->
288
288
+
acc )
286
289
[]
287
290
(Mist.Lex.String_map.bindings record)
288
291
···
290
293
let front =
291
294
String.sub handle 0 (String.length handle - (String.length Env.hostname + 1))
292
295
in
293
293
-
if String.contains front '.' then
294
294
-
Error
295
295
-
"handle can't contain periods"
296
296
+
if String.contains front '.' then Error "handle can't contain periods"
296
297
else
297
298
match String.length front with
298
299
| l when l < 3 ->