admin stuff
This commit is contained in:
parent
f87dcc8ee1
commit
2c80c58f59
@ -82,7 +82,7 @@ const flash = ({ type, msg }) => {
|
||||
[...document.querySelectorAll("#tags > .badge")].forEach(tag => tag.parentElement.removeChild(tag));
|
||||
_tags.reverse().forEach(tag => {
|
||||
const a = document.createElement("a");
|
||||
a.href = `/admin/test?tag=${tag.tag.replace(/\s/g, "+")}`;
|
||||
a.href = `/tag/${tag.tag}`;
|
||||
a.target = "_blank";
|
||||
a.style = "color: inherit !important";
|
||||
a.innerText = tag.tag;
|
||||
|
@ -16,20 +16,6 @@ const getTags = async itemid => await sql("tags_assign")
|
||||
.where("tags_assign.item_id", itemid)
|
||||
.select("tags.id", "tags.tag", "tags_assign.prefix");
|
||||
|
||||
const cleanTags = async () => {
|
||||
const tags = await sql("tags").leftJoin("tags_assign", "tags_assign.tag_id", "tags.id").whereNull("tags_assign.item_id");
|
||||
if(tags.length === 0)
|
||||
return;
|
||||
|
||||
let deleteTag = sql("tags");
|
||||
tags.forEach(tag => {
|
||||
if(["sfw", "nsfw"].includes(tag.tag.toLowerCase()))
|
||||
return;
|
||||
deleteTag = deleteTag.orWhere("id", tag.id);
|
||||
});
|
||||
await deleteTag.del();
|
||||
};
|
||||
|
||||
export default (router, tpl) => {
|
||||
router.group(/^\/api\/v2/, group => {
|
||||
|
||||
|
@ -83,6 +83,7 @@ import flummpress from "flummpress";
|
||||
await sql("user_sessions") // log last action
|
||||
.update("last_used", (Date.now() / 1e3))
|
||||
.update("last_action", req.url.pathname)
|
||||
.update("browser", req.headers["user-agent"])
|
||||
.where("id", user[0].sess_id);
|
||||
|
||||
// update userprofile
|
||||
|
@ -7,7 +7,6 @@
|
||||
<h5>f0ck Contact</h5>
|
||||
<p>Whatever it is, we might have a answer, even though it might not be the one you were looking for: <a href="mailto:admin@f0ck.me">admin@f0ck.me</a></p>
|
||||
<h5>About f0ck</h5>
|
||||
<p>f0ck archives any URL it is in the moment of requesting</p>
|
||||
<p>f0ck is your friendly IRC shitposting bot, it's built for catching urls that are passed to it and displays the content of passed urls on a simple and accessible web gallery reachable at <a href="/">f0ck.me</a></p>
|
||||
<h5>WTF is a f0ck?</h5>
|
||||
<p>A f0ck is basically giving a fuck about some internet bullshit, like stupid images, videos and so on, but also for great things like good music taste and shit, it's basically "a f0ck was given" and f0ck and it's users gave a lot of f0cks over the past years, it's not hard to finally start giving a damn f0ck about something, just f0ck it dood!</p>
|
||||
|
Loading…
Reference in New Issue
Block a user