Fix for mobility

This commit is contained in:
Akif9748 2022-09-17 20:17:18 +03:00
parent a1af3f2d4e
commit 5a05737f8b
3 changed files with 7 additions and 9 deletions

View file

@ -48,7 +48,7 @@ Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn
| categories page is need a update, thread count in category | ⚪ |
| preview for send messages in markdown format | ⚪ |
| DC auth will store code for taking tokens, and create secret model setting | ⚪ |
- max lengths for html :/
## Major Version History
- V4: Caching
- V3: New Theme

View file

@ -42,6 +42,9 @@ app.use(express.static("public"), express.json(), IP(),
}, BP({ extended: true })
);
if (discord_auth)
app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`);
if (RLS.enabled)
app.use(RL({ ...RLS, handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next() }));
@ -50,9 +53,4 @@ for (const file of fs.readdirSync("./routes"))
app.all("*", (req, res) => res.error(404, "We have not got this page."));
const server = app.listen(port, () => console.log(`${forum_name}-forum on port:`, port));
if (discord_auth) {
const { address } = server.address();
app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`);
}
app.listen(port, () => console.log(`${forum_name}-forum on port:`, port));

View file

@ -30,9 +30,9 @@
<h1 class="title" style="text-align:center;">Edit <a class="see" href="/users/<%= member.id %>"><%= member.name %></a></h1>
<div class="content">
<form id="form" class="see" style="box-shadow:none">
<input type="text" name="name" minlength="3" maxlength="25" placeholder="<%=member.name%>" class="input" required>
<input type="text" name="name" maxlength="25" placeholder="<%=member.name%>" class="input" >
<textarea class="input" name="about" maxlength="256" required rows="4" cols="60" name="content" placeholder="<%=member.about%>"></textarea>
<textarea class="input" name="about" maxlength="256" rows="4" cols="60" name="content" placeholder="<%=member.about%>"></textarea>
<% if (user?.admin){ %>
Is Admin? <input id='admin' type='checkbox' value='true' name='admin' <%=member.admin ? "checked": ""%>>
<input id='adminHidden' type='hidden' value='false' name='admin'>