{"id":19856682,"url":"https://github.com/sdekrishan/mockten","last_synced_at":"2026-05-11T13:02:26.648Z","repository":{"id":185173968,"uuid":"605426000","full_name":"sdekrishan/mockten","owner":"sdekrishan","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-23T09:00:30.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T23:46:45.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdekrishan.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-23T05:57:25.000Z","updated_at":"2023-05-01T03:25:31.000Z","dependencies_parsed_at":"2023-08-01T00:20:25.900Z","dependency_job_id":null,"html_url":"https://github.com/sdekrishan/mockten","commit_stats":null,"previous_names":["sdekrishan/mockten"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sdekrishan/mockten","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdekrishan%2Fmockten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdekrishan%2Fmockten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdekrishan%2Fmockten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdekrishan%2Fmockten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdekrishan","download_url":"https://codeload.github.com/sdekrishan/mockten/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdekrishan%2Fmockten/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32895978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:16:17.697Z","updated_at":"2026-05-11T13:02:26.611Z","avatar_url":"https://github.com/sdekrishan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Api Documentation\nThis api contains information about flights. In this api user can register and login theirselves. They can book the flights also and they can do crud operation on flight. User can see all the details related to booked flights.\n\n## Mock 10 Backend\nWe have three section in our api\n1. User\n2. Flight\n3. Booking\n4. DashBoard\n\n## Text Stacks :- MongoDB, Express, Node Js, Mongoose and cylic for deployment\n\nUse this link https://determined-smock-crow.cyclic.app\n\n## For User (/)\n\nThis api allows us to register and login \nIf you want to register then :- \n\n### Register a user\n /register\nyou need to give your name,email and password for register. (method : POST)\n\nresponses :\nif User already exists then it will say \"user already exist\"\nyou have to give all fields, if you missed one of them then it will give you an error that \" name is required \" as such.\nif you passed all the parameter then you will get \"user successfully created\"\n\n### Login a user\n \n /login\n you need to pass your email and password in body for loggin (method : POST)\n \n responses :- \n if you pass correct email but incorrect password you will get \"wrong credentials\"\n if you login with a email id that is not registered you will get \"user not found\"\n if you do everything corrected you will get \"user login successfully\"\n\n## Flight section (/flights)\n\n### Get all flights\n\nuse /flights to get all flights (method :GET)\n\nresponses : if there is no error in method or such you will get all the data as array of objects\nbut if you pass invalid method then you will get \"data not found\"\n\n### Get a particular flight with id\n\nuse /flights/id route to get a particular flight (method : GET)\n\nresponses:- if you want to get a flight with invalid id you will get \"flight not found with id\"\nif you pass an wrong method then you will get \"something went wrong with error message\"\nIf you do all things correctly you will get single data as object;\n\n### post a flight (create a flight);\n\nuse /flights for creating a new flight. (method : POST) {airline,flightNo,departure,arrival,departureTime,arrivalTime,seats,price} pass them in body\n\nresponses :- if you do something wrong then you will get  \"something went wrong with error message\"\nif you do all things correctly then you will get {{message:\"flight created successfully\",flight:new flight data}}\n\n### Update a flight\n\nuse /flights/:id route to update, pass your id after flights and send the data by passing in body (method : PATCH)\n\nresponses:- if you do something wrong then you will get  \"something went wrong with error message\"\nif you want to update some invalid flights i.e. id is not there then you will get \"flight not found with id\"\nif you do all things correctly then you will get \"flight has been updated\"\n\n### Delete a Flight\n\nuse /flights/:id route to delete any flight by their id. (method : DELETE)\n\nresponses:- if you do something wrong then you will get  \"something went wrong with error message\"\nif you want to delete invalid flights i.e. id is not there then you will get \"flight not found with id\"\nif you do all things correctly then you will get \"flight has been deleted\"\n\n## Booking\n\n### for booking a flight (/booking)\n\n /booking for book a flight. you have to pass the userId and flightId in body. Then you can book any flight (method : POST)\n\nresponses :- if you do something wrong then you will get  \"something went wrong \"\nif you do all things correctly then you will get \"book successfully\n\n\n### Dashboard (/dashboard)\n\nHere you can see all the flights who has been booked with all data related to user and flight (method : GET)\n\nresponses :- if you do something wrong then you will get  \"something went wrong \"\nif you do all things correctly then you will get data as an array of objects\n\n\nI hope you like the documentation and thank you for reading till now :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdekrishan%2Fmockten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdekrishan%2Fmockten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdekrishan%2Fmockten/lists"}