Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Ephemeral
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Volkor Barbarian Warrior
Ephemeral
Commits
3aa0c356
Unverified
Commit
3aa0c356
authored
2 years ago
by
Volkor Barbarian Warrior
Browse files
Options
Downloads
Patches
Plain Diff
oh my lord I need to move it to before it panics..
parent
5c63779f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+1
-1
1 addition, 1 deletion
src/main.rs
with
1 addition
and
1 deletion
src/main.rs
+
1
−
1
View file @
3aa0c356
...
...
@@ -53,10 +53,10 @@ async fn index(req: &mut Request, res: &mut Response) {
// build the path we need for the template.
let
template_with_host
=
"./templates/"
.to_owned
()
+
headers
[
HOST
]
.to_str
()
.unwrap_or
(
"localhost:8282"
);
tracing
::
debug!
(
"template_with_host: {:?}"
,
template_with_host
);
// Now we need to setup the templating engine.
let
tpls
:
Ramhorns
=
Ramhorns
::
from_folder
(
&
template_with_host
)
.expect
(
"Unable to find template, please place the templates correctly!"
);
tracing
::
debug!
(
"template_with_host: {:?}"
,
template_with_host
);
let
rendered
=
tpls
.get
(
"upload.html"
)
.unwrap
()
.render
(
&
""
);
// Removed templating for debugging multiple template dirs - I should probably add it back in.
res
.render
(
Text
::
Html
(
rendered
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment