Login/logout process.
This commit is contained in:
10
lib/db.js
10
lib/db.js
@@ -112,3 +112,13 @@ export async function getAccount(username = '') {
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export async function getPageviews(website_id) {
|
||||
return runQuery(
|
||||
prisma.pageview.findMany({
|
||||
where: {
|
||||
website_id,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,9 +12,4 @@ export function use(middleware) {
|
||||
});
|
||||
}
|
||||
|
||||
export const allowPost = use(
|
||||
cors({
|
||||
origin: '*',
|
||||
methods: ['POST', 'OPTIONS'],
|
||||
}),
|
||||
);
|
||||
export const useCors = use(cors());
|
||||
|
||||
Reference in New Issue
Block a user