mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +00:00
feat(labrinth): shared instances moderation (#6784)
* feat(labrinth): shared instance report type * style(labrinth): cargo fmt * feat(labrinth): check that instance exists when reporting * style(labrinth): cleanup unused import * feat(labrinth): store version id for shared instance reports * style(labrinth): satisfy clippy * fix(labrinth): use string id instead of int
This commit is contained in:
+4
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n INSERT INTO reports (\n id, report_type_id, mod_id, version_id, user_id,\n body, reporter\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7\n )\n ",
|
||||
"query": "\n INSERT INTO reports (\n id, report_type_id, mod_id, version_id, user_id,\n shared_instance_id, shared_instance_version_id, body, reporter\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9\n )\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
@@ -10,11 +10,13 @@
|
||||
"Int8",
|
||||
"Int8",
|
||||
"Int8",
|
||||
"Int8",
|
||||
"Int4",
|
||||
"Varchar",
|
||||
"Int8"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "c3f594d8d0ffcf5df1b36759cf3088bfaec496c5dfdbf496d3b05f0b122a5d0c"
|
||||
"hash": "d03688d1840db14dc10cc942a8aa0b819aa1ee54f121d2c47903d44fc871e45e"
|
||||
}
|
||||
+18
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.body, r.reporter, r.created, t.id thread_id, r.closed\n FROM reports r\n INNER JOIN report_types rt ON rt.id = r.report_type_id\n INNER JOIN threads t ON t.report_id = r.id\n WHERE r.id = ANY($1)\n ORDER BY r.created DESC\n ",
|
||||
"query": "\n SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.shared_instance_id, r.shared_instance_version_id, r.body, r.reporter, r.created, t.id thread_id, r.closed\n FROM reports r\n INNER JOIN report_types rt ON rt.id = r.report_type_id\n INNER JOIN threads t ON t.report_id = r.id\n WHERE r.id = ANY($1)\n ORDER BY r.created DESC\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -30,26 +30,36 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "shared_instance_id",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "shared_instance_version_id",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "body",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"ordinal": 8,
|
||||
"name": "reporter",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"ordinal": 9,
|
||||
"name": "created",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 10,
|
||||
"name": "thread_id",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 11,
|
||||
"name": "closed",
|
||||
"type_info": "Bool"
|
||||
}
|
||||
@@ -65,6 +75,8 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
@@ -72,5 +84,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "6b7958eac5f273af8f37c0c888594e106fe323cbb3b0c32868b02f869d30f33f"
|
||||
"hash": "de085413113d832b534db925b8bf1e50b852afea1c6e751664cae4fd9e789aab"
|
||||
}
|
||||
Reference in New Issue
Block a user