Skip to content

Commit

Permalink
fix endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
islemci committed Nov 30, 2024
1 parent 2a5a5de commit 5d9315d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ app.all('/', (req, res) => {
res.status(200).json(validEndpoints);
});

app.get('/api/fetch/:item', (req: Request, res: Response) => {
app.get('/fetch/:item', (req: Request, res: Response) => {
if (req.params.item === 'passwords') {
return passwordsGet(req, res);
} else if (req.params.item === 'notes') {
Expand All @@ -50,7 +50,7 @@ app.get('/api/fetch/:item', (req: Request, res: Response) => {
}
});

app.post('/api/create/:item', (req: Request, res: Response) => {
app.post('/create/:item', (req: Request, res: Response) => {
if (req.params.item === 'passwords') {
return passwordsCreate(req, res);
} else if (req.params.item === 'notes') {
Expand All @@ -63,7 +63,7 @@ app.post('/api/create/:item', (req: Request, res: Response) => {
}
});

app.post('/api/auth/:item', (req: Request, res: Response) => {
app.post('/auth/:item', (req: Request, res: Response) => {
if (req.params.item === 'register') {
return register(req, res);
}
Expand Down

0 comments on commit 5d9315d

Please sign in to comment.