Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

Commit

Permalink
1.7.4: Properly assign the author of links uploaded via the ShareX en…
Browse files Browse the repository at this point in the history
…dpoint (#108)

* Properly assign the author of links uploaded via the ShareX endpoint

* docs(license): update copyright year(s)
  • Loading branch information
JackBailey authored Jan 4, 2024
1 parent c94af83 commit 78990b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.7.4] - 2023-12-30

- Properly assign the author of links uploaded via the ShareX endpoint

## [1.7.3] - 2023-08-21

- Bug fixes:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Jack Bailey
Copyright (c) 2022-2024 Jack Bailey

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.3
1.7.4
8 changes: 4 additions & 4 deletions src/api/sharex.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const domain = process.env.DOMAIN || "http://localhost:3000";
router.post("/", upload.none(), async (req, res) => {
const { secret, url } = req.body;

const Account = await getAccountBySecret({ secret });
if (!Account) {
return res.status(403).json({
const [Account, accountError] = await getAccountBySecret({ secret });
if (accountError) {
return res.status(accountError.code).json({
success: false,
error: "Invalid Secret.",
error: accountError.message,
});
}

Expand Down

0 comments on commit 78990b1

Please sign in to comment.