Skip to content

Salerno23/SocialNetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ændr ConnectionString i appsettings.json for eget MongoDb ConnectionString, hvis nødvendigt.


Første kørsel af SocialNetwork solution:

  1. Byg solution
  2. Kør projekt med Ctrl + F5
  3. Åbn Postman program
  4. Seed databasen ved at lave en GET request på: https://localhost:/api/seed

Tilgå de forskellige collections i SocialNetwork databasen:

  1. Kør projekt med Ctrl + F5
  2. Åbn Postman program
  3. Tilgå collection ved at lave en GET request på: 3a. https://localhost:/api/blocked 3b. https://localhost:/api/circle 3c. https://localhost:/api/comment 3d. https://localhost:/api/follows 3e. https://localhost:/api/post 3f. https://localhost:/api/user

Querying Feed for user eller User Wall hvor Guest har adgangsrettigheder:

Tilgå feed for user:

  1. Kør projekt med Ctrl + F5
  2. Åbn Postman program
  3. Tilgå feed ved lave en GET request på: https://localhost:/api/feeduser/User fx: https://localhost:/api/feeduser/User1 https://localhost:/api/feeduser/User2 osv..

Tilgå wall for user, som guest har adgangsrettigheder til:

  1. Kør projekt med Ctrl + F5
  2. Åbn Postman program
  3. Tilgå wall ved at lave en GET request på: https://localhost:/api/walluserguest/User/User fx: https://localhost:/api/walluserguest/User2/User1 hvor User2 er User og User1 er Guest

Post data til databasen:

Opret en post lavet af en user ved at:

  1. Kør projekt med Ctrl + F5
  2. Åbn Postman program
  3. Lav en POST request til: https://localhost:44315/api/createpost/User fx: https://localhost:44315/api/createpost/User1

hvor body består af en raw JSON med følgende indhold:

{ "postId": "PostId", "post_": "", "date":"Thh:mm:ssZ, "contentType": <"text" || "image">, "isPublic": <true || false>, "comments": [], "circleRef": [] }

fx:

{ "postId": "PostId7", "post_": "this is post 7", "date": "2020-05-05T22:00:00Z", "contentType": "text", "isPublic": true, "comments": [], "circleRef": [] }

JSON indhold: : Består af enten tekst for en post eller imaginær URL/string for beliggenhed af det uploadede image "contentType": "text" hvis det er en tekst post, "image" hvis det er en image post "isPublic": er false hvis post er til en circle "circleRef": CircleId'er hvorpå denne post er postet til.

Lav en comment for PostId:

  1. Kør projekt med Ctrl + F5
  2. Åbn Postman program
  3. Lav en POST request til: https://localhost:/api/createcomment/PostId

hvor body består af en raw JSON med følgende indhold:

{ "commentId": "CommentId", "userId": "User", "text": "", "date": "Thh:mm:ssZ" }

fx:

{ "commentId": "CommentId5", "userId": "User1", "text": "Post comment", "date": "2020-05-05T22:00:00Z" }

JSON indhold: "userId" : User der har oprettet selve kommentaren


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages