Skip to content

neo-sram/test_nes

Repository files navigation

full API sided app for Users , Blogs , Comments

this API side app lets the user create blogs and comment on other users blogs

technologies used :

  • NestJs
  • Node.js

EndPoints :

Users :

  • ' GET /userAuth/all ' gets all users
  • ' POST /userAuth/create ' posts a body containing a user object

Posts :

  • ' Post /post/postCreate ' posts a body containng a post object that directly determines its writter from the JSON
  • ' Get /post/getPostOf/:id ' gets the posts associated with the userId provided

comments :

  • ' Post /comment/commentCreate/postOfUser/:id/postNum/:postNumber ' creates a comment in the specified blog of the specified user

classes :

  • User :
 class User {
  id: number;
  name: string;
  age: number;
  blogs?: Blog[];
}
  • Blog :
export class Blog {
  writer: number;
  content: string;
  comments?: Commentary[];

  constructor(writer: number, content: string) {
    this.content = content;
    this.writer = writer;
    this.comments = [];
  }
}
  • Comment :
class Commentary {
  writer?: number;
  content: string;

  constructor(content: string) {
    this.content = content;
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors