Generate total balance for member.

This commit is contained in:
Dominik Pantůček 2023-04-01 17:41:59 +02:00
parent d092275797
commit 76ff48329a
3 changed files with 22 additions and 7 deletions

View file

@ -26,12 +26,13 @@
(declare (unit web-static))
(module
web-static-output
web-static
(
gen-web-static-member
)
(import scheme
(chicken base)
(chicken format)
member-record)
@ -40,8 +41,12 @@
(define (gen-web-static-member mr)
(let ((nick (member-nick mr))
(id (member-id mr)))
(let ((nf (open-output-file (sprintf "~A.id" nick))))
(display id nf)
(newline nf))))
(with-output-to-file (sprintf "~A.id" nick)
(lambda ()
(print id)))
(with-output-to-file (sprintf "~A.balance" nick)
(lambda ()
(print (member-total-balance mr))))
))
)