refactor: rename siteKey column to site
This commit is contained in:
parent
232df2b60a
commit
4a3030596f
|
@ -64,10 +64,9 @@ const Feed = ({
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
title: "Loading",
|
title: "Loading",
|
||||||
id: 0,
|
id: 0,
|
||||||
slug: "loading",
|
|
||||||
cid: "",
|
cid: "",
|
||||||
url: "",
|
url: "",
|
||||||
siteKey: "",
|
site: "",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ export async function action({ request }: ActionFunctionArgs) {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
slug: slugify(new URL(url).pathname),
|
slug: slugify(new URL(url).pathname),
|
||||||
siteKey: data.site,
|
site: data.site,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Insert a new record into the database
|
// Insert a new record into the database
|
||||||
|
|
|
@ -18,7 +18,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
|
||||||
let filters = [];
|
let filters = [];
|
||||||
|
|
||||||
if (site) {
|
if (site) {
|
||||||
filters.push(`siteKey = ${site}`);
|
filters.push(`site = ${site}`);
|
||||||
}
|
}
|
||||||
if (time) {
|
if (time) {
|
||||||
filters.push(`createdTimestamp >= ${parseInt(time).toString()}`);
|
filters.push(`createdTimestamp >= ${parseInt(time).toString()}`);
|
||||||
|
|
|
@ -37,7 +37,7 @@ export async function getResults({
|
||||||
let filters = [];
|
let filters = [];
|
||||||
|
|
||||||
if (site) {
|
if (site) {
|
||||||
filters.push(`siteKey = ${site}`);
|
filters.push(`site = ${site}`);
|
||||||
}
|
}
|
||||||
if (time) {
|
if (time) {
|
||||||
filters.push(`createdTimestamp >= ${parseInt(time).toString()}`);
|
filters.push(`createdTimestamp >= ${parseInt(time).toString()}`);
|
||||||
|
|
|
@ -16,5 +16,5 @@ model Article {
|
||||||
url String
|
url String
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
siteKey String
|
site String
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue