mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 10:19:06 +01:00
Merge branch 'develop' into chore/findOneBy-exist
This commit is contained in:
commit
98f7ebd3f7
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ function getUserToken(ctx: Koa.BaseContext): string | null {
|
|||
|
||||
function compareOrigin(ctx: Koa.BaseContext): boolean {
|
||||
function normalizeUrl(url?: string): string {
|
||||
return slice( url.length - 1) : url) : "";
|
||||
return url ? (url.endsWith("/") ? url.slice(0, url.length - 1) : url) : "";
|
||||
}
|
||||
|
||||
const referer = ctx.headers["referer"];
|
||||
|
|
|
@ -18,7 +18,7 @@ function getUserToken(ctx: Koa.BaseContext): string | null {
|
|||
|
||||
function compareOrigin(ctx: Koa.BaseContext): boolean {
|
||||
function normalizeUrl(url?: string): string {
|
||||
return slice( url.length - 1) : url) : "";
|
||||
return url ? (url.endsWith("/") ? url.slice(0, url.length - 1) : url) : "";
|
||||
}
|
||||
|
||||
const referer = ctx.headers["referer"];
|
||||
|
|
Loading…
Reference in a new issue