mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 19:01:32 +00:00
Merge branch 'combined_tables_2' into search_combined
This commit is contained in:
commit
fb1f2ff174
3 changed files with 5 additions and 16 deletions
|
@ -698,7 +698,7 @@ test("Report a post", async () => {
|
|||
() =>
|
||||
listReports(beta).then(p =>
|
||||
p.reports.find(r => {
|
||||
return checkReportName(r, gammaReport);
|
||||
return checkPostReportName(r, gammaReport);
|
||||
}),
|
||||
),
|
||||
res => !!res,
|
||||
|
@ -718,15 +718,7 @@ test("Report a post", async () => {
|
|||
() =>
|
||||
listReports(alpha).then(p =>
|
||||
p.reports.find(r => {
|
||||
switch (r.type_) {
|
||||
case "Post":
|
||||
return (
|
||||
r.post_report.original_post_name ===
|
||||
gammaReport.original_post_name
|
||||
);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return checkPostReportName(r, gammaReport);
|
||||
}),
|
||||
),
|
||||
res => !!res,
|
||||
|
@ -833,7 +825,7 @@ test("Rewrite markdown links", async () => {
|
|||
);
|
||||
});
|
||||
|
||||
function checkReportName(rcv: ReportCombinedView, report: PostReport) {
|
||||
function checkPostReportName(rcv: ReportCombinedView, report: PostReport) {
|
||||
switch (rcv.type_) {
|
||||
case "Post":
|
||||
return rcv.post_report.original_post_name === report.original_post_name;
|
||||
|
|
|
@ -190,7 +190,7 @@ pub struct LtreeDef(pub String);
|
|||
#[cfg_attr(feature = "full", ts(export))]
|
||||
pub struct DbUrl(pub(crate) Box<Url>);
|
||||
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Serialize, Deserialize, Default)]
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Default)]
|
||||
#[cfg_attr(feature = "full", derive(DieselNewType))]
|
||||
/// The report combined id
|
||||
pub struct ReportCombinedId(i32);
|
||||
|
|
|
@ -4,11 +4,8 @@ use crate::schema::report_combined;
|
|||
use chrono::{DateTime, Utc};
|
||||
#[cfg(feature = "full")]
|
||||
use i_love_jesus::CursorKeysModule;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
derive(Identifiable, Queryable, Selectable, CursorKeysModule)
|
||||
|
|
Loading…
Reference in a new issue