Move secret file to content/ folder.

This commit is contained in:
Dillon Kearns 2021-12-30 09:38:03 -08:00
parent 9e9eb26a02
commit 972c0ea9ce
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,3 @@
This is a top secret note. You can only access this if the elm-pages server lets you in. It's not a very good secret because this repo is open source, but if it were a private repo then you wouldn't be able to access this data without logging in first!
The secret is that there isn't actually a secret.

View File

@ -10,4 +10,4 @@
framework = "#custom"
[functions]
included_files = ["secret-note.txt"]
included_files = ["content/**/*"]

View File

@ -58,7 +58,7 @@ data routeParams =
username
|> LoggedInInfo
|> DataSource.succeed
|> DataSource.andMap (DataSource.File.rawFile "./secret-note.txt")
|> DataSource.andMap (DataSource.File.rawFile "content/secret-note.txt")
|> DataSource.map LoggedIn
|> DataSource.map PageServerResponse.RenderPage
)