Skip to content

Commit

Permalink
Update files.api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Jun 26, 2024
1 parent e6b2610 commit aa6067b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/nextjs/pages/api/files.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Readable } from "stream";
import { FilesDb } from "~~/databases/files.db";
import withErrorHandler from "~~/middlewares/withErrorHandler";
import { FileModel } from "~~/models/file.model";
import { authentify, getWalletAddressFromToken, testEncryption } from "~~/servers/auth";
import { authentify, getWalletAddressFromToken } from "~~/servers/auth";
import { getIpfsUrl, ipfsClient, pinata, pushObjectToIpfs } from "~~/servers/ipfs";
import logger from "~~/services/logger.service";

Expand All @@ -22,7 +22,6 @@ export const config = {
};

const handler = async (req: NextApiRequest, res: NextApiResponse<string>) => {
if (!(await testEncryption(res))) return;
if (req.method === "POST") {
if (req.query.publish === "true") {
// Publish the file to IPFS
Expand Down

0 comments on commit aa6067b

Please sign in to comment.