Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf

This commit fixes the style issues introduced in 564f06c according to the output
from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java
Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt,
Scalafmt, StandardJS, StandardRB, swift-format and Yapf.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored May 10, 2024
1 parent 564f06c commit 5573434
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/routes/transfers.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
const express = require("express");
const router = express.Router();
const express = require('express')
const router = express.Router()

const TransferController = require("../controllers/transfers");
const authenticate = require("../middleware/auth");
const createTransaction = require("../middleware/network");
const TransferController = require('../controllers/transfers')
const authenticate = require('../middleware/auth')
const createTransaction = require('../middleware/network')

router.post("/", authenticate, async (req, res) => {
router.post('/', authenticate, async (req, res) => {
try {
const transfer = await TransferController.create(req, res);
const transactionHash = await createTransaction(req.user.wallet_address, req.body.receiver_account_id, req.body.amount);
transfer.transaction_hash = transactionHash;
await transfer.save();
res.json({ message: "Transfer successful", transfer });
const transfer = await TransferController.create(req, res)
const transactionHash = await createTransaction(
req.user.wallet_address,
req.body.receiver_account_id,
req.body.amount
)
transfer.transaction_hash = transactionHash
await transfer.save()
res.json({ message: 'Transfer successful', transfer })
} catch (error) {
res.status(400).json({ message: error.message });
res.status(400).json({ message: error.message })
}
});
})

module.exports = router;
module.exports = router

0 comments on commit 5573434

Please sign in to comment.