Skip to content

Commit

Permalink
Merge pull request #97 from hngprojects/revert-83-feat/68-blog-post-l…
Browse files Browse the repository at this point in the history
…isting

Revert "Feat/68 blog post listing"
  • Loading branch information
Idimmusix authored Jul 22, 2024
2 parents bf4e756 + 53ef271 commit 9c86940
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 97 deletions.
34 changes: 0 additions & 34 deletions src/controllers/BlogController.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/controllers/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// silence is golden
export * from "./AuthController";
export * from "./UserController";
export * from "./BlogController"
export * from "./HelpController";
export * from "./NotificationController";
10 changes: 8 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import express, { Express, Request, Response } from "express";
import config from "./config";
import dotenv from "dotenv";
import cors from "cors";
import { userRouter, authRoute, testimonialRoute, notificationRouter, smsRouter, blogRoute } from "./routes";
import {
userRouter,
authRoute,
helpRouter,
testimonialRoute,
notificationRouter,
smsRouter,
} from "./routes";
import { routeNotFound, errorHandler } from "./middleware";
import { orgRouter } from "./routes/organisation";
import swaggerUi from "swagger-ui-express";
Expand Down Expand Up @@ -40,7 +47,6 @@ server.use("/api/v1/auth", authRoute);
server.use("/api/v1/help-center", helpRouter);
server.use("/api/v1/sms", smsRouter);
server.use("/api/v1", testimonialRoute);
server.use("/api/v1/blogs", blogRoute);
server.use("/api/v1/docs", swaggerUi.serve, swaggerUi.setup(swaggerSpec));
server.use(routeNotFound);
server.use(errorHandler);
Expand Down
2 changes: 0 additions & 2 deletions src/middleware/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export * from "./error";
export * from "./auth";
export * from "./methodNotAllowed";

8 changes: 0 additions & 8 deletions src/middleware/methodNotAllowed.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/routes/blog.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ export * from "./auth";
export * from "./user";
export * from "./help-center";
export * from "./testimonial";
export * from "./notificationsettings"
export * from "./blog";
export * from "./sms";

export * from "./notificationsettings";
22 changes: 0 additions & 22 deletions src/services/blog.services.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./auth.services";
export * from "./user.services";
export * from "./blog.services";
export * from "./help.services";
export * from "./help.services";
11 changes: 0 additions & 11 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
import { User } from "../models";

export interface PaginatedBlogResponse {
count: number;
next: string | null;
previous: string | null;
results: Blog[];
}

export interface IBlogService {
getPaginatedBlogPosts(page: number, pageSize: number): Promise<PaginatedBlogResponse>;
}

export interface IUserService {
getUserById(id: string): Promise<User | null>;
getAllUsers(): Promise<User[]>;
Expand Down

0 comments on commit 9c86940

Please sign in to comment.