Skip to content

AgroDevUz/test-react-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raqamlashtirish Markazining test uchun texnik vazifasi

React.jsda tayyorlangan starter kodni davom ettiring! Vazifaning ko'rinishi : Figma URL API ning asosiy URLi: http://92.63.206.40:1122/api

❗❗❗ Ishni boshlashdan oldin ushbu repozitoriyani o'zingizga fork qilib oling.

API manzillari

  1. Log in : http://92.63.206.40:1122/api/login
  2. Sign in : http://92.63.206.40:1122/api/signin
  3. User data : http://92.63.206.40:1122/api/user
  4. Faculty list : http://92.63.206.40:1122/api/faculty
  5. Change password : http://92.63.206.40:1122/api/change_password
  6. Change phone : http://92.63.206.40:1122/api/change_phone
  7. Change email : http://92.63.206.40:1122/api/change_email

Frontend qism uchun

  1. Log in page: http://92.63.206.40:1122/api/login
  2. Sign in page: http://92.63.206.40:1122/api/login
  3. Profile page: http://92.63.206.40:1122/api/login

Log in

Request Method - POST

Payload:

  1. login
  2. password

Response:

{
  "msg": "ok",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U"
}

Sign In

Request Method - POST

Payload:

  1. login
  2. password
  3. surname
  4. name
  5. faculty_id
  6. phone
  7. email

Response:

{
  "msg": "ok"
}

User data

Request Method - GET

Requst Header:

x-access-token : token

Login qilgan vaqtda oladigon tokenni request headerga qo'yib jonatiladi

Response:

{
  "msg": "ok",
  "surname": "Surname",
  "name": "Name",
  "faculty_id": 123,
  "id": 15,
  "std_code": 123456,
  "phone": "+998901234567"
}

Faculty-list

Request Method - GET

Response:

{
  "1": "Faculty1",
  "2": "Faculty2",
  "3": "Faculty3",
 ...
}

Change password

Request Method - POST

Requst Header:

x-access-token : token

Payload:

  1. old_password
  2. new_password
  3. repeat_password `

Response:

{
  "msg": "ok"
}

Change phone

Request Method - POST

Requst Header:

x-access-token : token

Payload:

  1. phone

Response:

{
  "msg": "ok"
}

Change email

Request Method - POST

Requst Header:

x-access-token : token

Payload:

  1. email

Response:

{
  "msg": "ok"
}

React.js

React.jsda tayyorlangan starter kodni yuklab olib davom ettiring!

O'rnatib olish - yarn install

Ishga tushirish - yarn start

Login front

1.Figmadagi sign up sahifasini ishlab chiqish va API bilan bog'lash

Signin front

1.Figmadagi sign in sahifasini ishlab chiqish va API bilan bog'lash

Profile front

1.Figmadagi profile sahifasini ishlab chiqish va API bilan bog'lash

❗❗❗Sahifalarni ishlab chiqish jarayonida kamida styled-components, redux, , axios, hooks va react-router-dom v6 foydalanish talab qilinadi!

Asosiy packetlar o'rnatilgan.

Vazifani topshirish

Vazifani GOOGLE FORM ga yuklang

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published