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