actually fix strike date not set if status changed but strike reason not
All checks were successful
delpoy / build-and-deploy (push) Successful in 39s
All checks were successful
delpoy / build-and-deploy (push) Successful in 39s
This commit is contained in:
parent
3dd56bc471
commit
7357ad9e88
@ -119,9 +119,6 @@ export const PATCH = (async ({ request, cookies }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
report.reported_id = reported?.id ?? null;
|
report.reported_id = reported?.id ?? null;
|
||||||
if (data.notice != null) report.notice = data.notice;
|
|
||||||
if (data.statement != null) report.statement = data.statement;
|
|
||||||
if (data.status != null) report.status = data.status;
|
|
||||||
if (data.strike_reason != null) {
|
if (data.strike_reason != null) {
|
||||||
if (data.status !== 'reviewed') {
|
if (data.status !== 'reviewed') {
|
||||||
if (data.strike_reason == -1) {
|
if (data.strike_reason == -1) {
|
||||||
@ -145,6 +142,9 @@ export const PATCH = (async ({ request, cookies }) => {
|
|||||||
report.striked_at = new Date(Date.now());
|
report.striked_at = new Date(Date.now());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (data.notice != null) report.notice = data.notice;
|
||||||
|
if (data.statement != null) report.statement = data.statement;
|
||||||
|
if (data.status != null) report.status = data.status;
|
||||||
if (admin != null) report.auditor_id = admin.id;
|
if (admin != null) report.auditor_id = admin.id;
|
||||||
|
|
||||||
await report.save();
|
await report.save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user