Login/logout process.

This commit is contained in:
Mike Cao 2020-07-25 16:31:07 -07:00
parent 0f0b1e39e7
commit f947c7770b
10 changed files with 91 additions and 58 deletions

View file

@ -112,3 +112,13 @@ export async function getAccount(username = '') {
}),
);
}
export async function getPageviews(website_id) {
return runQuery(
prisma.pageview.findMany({
where: {
website_id,
},
}),
);
}

View file

@ -12,9 +12,4 @@ export function use(middleware) {
});
}
export const allowPost = use(
cors({
origin: '*',
methods: ['POST', 'OPTIONS'],
}),
);
export const useCors = use(cors());