Patches and cleanup

This commit is contained in:
oitsjustjose 2022-04-15 08:29:14 -05:00
commit c4b7d6d5ca
2 changed files with 9 additions and 1 deletions

View file

@ -7,7 +7,7 @@ import UserInjection from "./app/middleware/UserInjection";
import { UserModel } from "./app/models/User";
interface AuthenticatableRequest {
user: UserModel | null;
user?: UserModel;
}
declare global {
@ -42,7 +42,9 @@ Routes.forEach(({ path, httpMethod, handler }) => {
app.patch(path, handler);
break;
}
console.log("-------------------------------------------------");
console.log(`${httpMethod}: ${path}`);
});
console.log("-------------------------------------------------");
export default app;

View file

@ -1,6 +1,7 @@
import { RouteCollection } from "../routes";
import create from "./crud/create";
import del from "./crud/delete";
import forgot from "./crud/forgot";
import login from "./login";
import validate from "./validate";
@ -20,6 +21,11 @@ const routes: RouteCollection[] = [
path: "/api/v1/user/login",
handler: login,
},
{
httpMethod: "GET",
path: "/api/v1/user/forgot",
handler: forgot,
},
{
httpMethod: "GET",
path: "/api/v1/user/validateEmail",