Small improvements & fixes
This commit is contained in:
@@ -1042,7 +1042,7 @@ app.put(
|
||||
},
|
||||
query: t.Object({
|
||||
id: t.String(),
|
||||
likedQuery: t.String()
|
||||
liked: t.String()
|
||||
}),
|
||||
headers: t.Object({
|
||||
authorization: t.String({
|
||||
|
||||
@@ -38,14 +38,6 @@ export async function handler (context: Context) {
|
||||
const userId = authResult.id
|
||||
|
||||
let idQuery = context.query.id ? parseInt(context.query.id, 10) : 0
|
||||
if (!idQuery || idQuery < 1) {
|
||||
connection0.end()
|
||||
connection1.end()
|
||||
return jsonResponse(
|
||||
{ success: false, message: 'No valid post ID provided', data: null },
|
||||
400
|
||||
)
|
||||
}
|
||||
|
||||
const result = await db1
|
||||
.update(berryDashUserPosts)
|
||||
|
||||
@@ -22,14 +22,6 @@ export async function handler (context: Context) {
|
||||
let userIdQuery = context.query.userId
|
||||
? parseInt(context.query.userId, 10)
|
||||
: 0
|
||||
if (!userIdQuery || userIdQuery < 1) {
|
||||
connection0.end()
|
||||
connection1.end()
|
||||
return jsonResponse(
|
||||
{ success: false, message: 'No valid user ID provided', data: null },
|
||||
400
|
||||
)
|
||||
}
|
||||
|
||||
const user = await db0
|
||||
.select({ id: users.id })
|
||||
|
||||
Reference in New Issue
Block a user