v3: fixed journal view not scrolling, fixed some user profile layout bugs, increase thumbnail size on the index
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 43s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 43s
This commit is contained in:
@@ -129,7 +129,7 @@ router.put("/:dumpId/file", authMiddleware, async (ctx) => {
|
||||
const userId = ctx.state.user?.userId;
|
||||
|
||||
const dump = getDump(dumpId, userId);
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
@@ -175,7 +175,7 @@ router.put("/:dumpId", authMiddleware, async (ctx) => {
|
||||
|
||||
const dump = getDump(dumpId, userId);
|
||||
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
@@ -193,7 +193,7 @@ router.put("/:dumpId/thumbnail", authMiddleware, async (ctx) => {
|
||||
const userId = ctx.state.user?.userId;
|
||||
|
||||
const dump = getDump(dumpId, userId);
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
@@ -235,7 +235,7 @@ router.delete("/:dumpId/thumbnail", authMiddleware, async (ctx) => {
|
||||
const userId = ctx.state.user?.userId;
|
||||
|
||||
const dump = getDump(dumpId, userId);
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
@@ -253,7 +253,7 @@ router.post("/:dumpId/refresh-metadata", authMiddleware, async (ctx) => {
|
||||
const userId = ctx.state.user?.userId;
|
||||
const dump = getDump(dumpId, userId);
|
||||
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
@@ -271,7 +271,7 @@ router.delete("/:dumpId", authMiddleware, async (ctx) => {
|
||||
const userId = ctx.state.user?.userId;
|
||||
const dump = getDump(dumpId, userId);
|
||||
|
||||
if (userId !== dump.userId) {
|
||||
if (userId !== dump.userId && !ctx.state.user?.isAdmin) {
|
||||
throw new APIException(
|
||||
APIErrorCode.UNAUTHORIZED,
|
||||
403,
|
||||
|
||||
Reference in New Issue
Block a user