mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix
This commit is contained in:
@@ -46,7 +46,7 @@ export default class URL {
|
||||
}
|
||||
|
||||
static fromString(url: string): URL {
|
||||
let protocol: $TSFixMe = Protocol.HTTPS;
|
||||
let protocol: Protocol = Protocol.HTTPS;
|
||||
|
||||
if (url.startsWith('https://')) {
|
||||
protocol = Protocol.HTTPS;
|
||||
@@ -73,12 +73,12 @@ export default class URL {
|
||||
url = url.replace('mongodb://', '');
|
||||
}
|
||||
|
||||
const hostname: $TSFixMe = new Hostname(url.split('/')[0] || '');
|
||||
const hostname: Hostname = new Hostname(url.split('/')[0] || '');
|
||||
|
||||
let route: $TSFixMe;
|
||||
let route: Route;
|
||||
|
||||
if (url.split('/').length > 1) {
|
||||
const paths: $TSFixMe = url.split('/');
|
||||
const paths: Array<string> = url.split('/');
|
||||
paths.shift();
|
||||
route = new Route(paths.join('/'));
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export default class Slug {
|
||||
return '';
|
||||
}
|
||||
|
||||
let slug: $TSFixMe = slugify(name, { remove: /[&*+~.,\\/()|'"!:@]+/g });
|
||||
let slug: string = slugify(name, { remove: /[&*+~.,\\/()|'"!:@]+/g });
|
||||
slug = `${slug}-${customAlphabet(numbers, 10)}`;
|
||||
slug = slug.toLowerCase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user