Updated packages. Allow url in query strings.

This commit is contained in:
Mike Cao 2020-09-02 15:13:45 -07:00
parent 353907e71d
commit a3e920d944
4 changed files with 305 additions and 510 deletions

View file

@ -34,7 +34,6 @@ export default prisma;
export async function runQuery(query) {
return query.catch(e => {
console.error(e);
throw e;
});
}

View file

@ -13,7 +13,11 @@ export const urlFilter = (data, { raw }) => {
const cleanUrl = url => {
try {
const { pathname, searchParams } = new URL(url);
const { pathname, search, searchParams } = new URL(url);
if (search.startsWith('?/')) {
return `${pathname}${search}`;
}
const path = removeTrailingSlash(pathname);
const ref = searchParams.get('ref');