-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ba861b
commit 11a0d5d
Showing
10 changed files
with
54 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* AbstractRoutes.ts :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: alle.roy <alle.roy.student@42.fr> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/01/29 15:35:24 by alle.roy #+# #+# */ | ||
/* Updated: 2023/02/11 04:19:41 by alle.roy ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
import Base from "../../abstracts/Base"; | ||
import { Router, Response } from "express"; | ||
import express from "express"; | ||
|
||
import CacheManager from "../../cache/CacheManager"; | ||
import Authentication from "./middlewares/Authentication"; | ||
|
||
export default abstract class AbstractWebRoutes extends Base { | ||
protected router: Router | ||
public isProtected: boolean; | ||
public prefix: string | ||
|
||
public constructor() { | ||
super("routes", "", "SERVER") | ||
this.router = router; | ||
|
||
this.register(); // SELF REGISTERING. | ||
} | ||
|
||
public abstract register(): void | ||
public routing(): Router { | ||
return router; | ||
} | ||
} | ||
|
||
export const router = express.Router() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters