Skip to content

Commit

Permalink
fix: removed validator and url usage
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jan 26, 2024
1 parent c538200 commit 4f5a2bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"path-to-regexp": "^6.2.1",
"raw-body": "^2.5.2",
"rrule": "^2.8.1",
"validator": "^13.11.0",
"winston": "^3.11.0",
"xmlbuilder2": "^3.1.1",
"xmldom": "^0.6.0",
Expand Down
3 changes: 1 addition & 2 deletions src/koa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import parseBody from './common/parseBody';
import winston from './common/winston';
import cal from './routes/calendar/calendar';
import pri from './routes/principal/principal';
import { isURL } from 'validator';
import { Request, ParameterizedContext } from 'koa';
import { FullCalendar } from 'ical';

Expand Down Expand Up @@ -45,7 +44,7 @@ export default function(opts: CalDavOptions) {

const log = winston({ ...opts, label: 'index' });

const rootRoute = isURL(opts.caldavRoot) ? path.join(opts.caldavRoot, '/') : path.join('/', opts.caldavRoot);
const rootRoute = path.join('/', opts.caldavRoot);
const calendarRoute = path.join(rootRoute, opts.calendarRoot);
const principalRoute = path.join(rootRoute, opts.principalRoot, '/');

Expand Down

0 comments on commit 4f5a2bb

Please sign in to comment.