Skip to content

Commit

Permalink
fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhanasand committed Feb 18, 2025
1 parent dd9e08d commit 193fee7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion api/src/delete/blacklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { runInTransaction } from "../db.js"
export default async function blacklistDeleteHandler(req: FastifyRequest, res: FastifyReply) {
const { name } = req.params as { name: string }
if (!name) {
return res.status(400).send({ error: "Missing name parameter." })
return res.status(400).send({ error: "Missing name parameter." })
}

try {
Expand Down
2 changes: 1 addition & 1 deletion api/src/delete/whitelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { runInTransaction } from "../db.js"
export default async function whitelistDeleteHandler(req: FastifyRequest, res: FastifyReply) {
const { name } = req.params as { name: string }
if (!name) {
return res.status(400).send({ error: "Missing name parameter." })
return res.status(400).send({ error: "Missing name parameter." })
}

try {
Expand Down
4 changes: 2 additions & 2 deletions api/src/get/blacklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export async function blacklistHandler(req: FastifyRequest, res: FastifyReply) {
FROM blacklist b
LEFT JOIN blacklist_versions bv ON b.name = bv.name
LEFT JOIN blacklist_ecosystems be ON b.name = be.name
WHERE b.name = $1 AND bv.version = $2 AND be.ecosystem = $3;`,
[name, version, ecosystem]
WHERE b.name = $1 AND bv.version = $2 AND be.ecosystem = $3;
`, [name, version, ecosystem]
)

if (result.rows.length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions api/src/get/whitelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export async function whitelistHandler(req: FastifyRequest, res: FastifyReply) {
FROM whitelist w
LEFT JOIN whitelist_versions wv ON w.name = wv.name
LEFT JOIN whitelist_ecosystems we ON w.name = we.name
WHERE w.name = $1 AND wv.version = $2 AND we.ecosystem = $3;`,
[name, version, ecosystem]
WHERE w.name = $1 AND wv.version = $2 AND we.ecosystem = $3;
`, [name, version, ecosystem]
)

if (result.rows.length === 0) {
Expand Down
10 changes: 5 additions & 5 deletions api/src/put/blacklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { FastifyReply, FastifyRequest } from "fastify"
import { runInTransaction } from "../db.js"

type BlacklistUpdateBody = {
name: string
oldVersion: string
newVersion: string
ecosystem: string
comment: string
name: string
oldVersion: string
newVersion: string
ecosystem: string
comment: string
}

export default async function blacklistPutHandler(req: FastifyRequest, res: FastifyReply) {
Expand Down

0 comments on commit 193fee7

Please sign in to comment.