Skip to content

striderdu/tinysun-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinysun

表结构

  • users
id username password role
1 dht dht 1
  • students
student_id name teacher_id finished
1 strider 7 0
  • problems
teacher_id problem total
7 1+1 1

接口描述

root: http://39.105.8.165:3000

POST /login-check

  • @reqParam:

    • username string
    • password string
  • @resParam:

    • status integer
    • id integer (teacher required)
return status
-1: login error
1: login by student
2: login by teacher

GET /teacher?id=something

  • @reqParam:
    • teacher_id integer
  • @resParam:
    • stu{ student_id name teacher_id: finished: } array
    • prob{ problem: total: } array
{
    "stu":[{
        "student_id":3,
        "name":"myz",
        "teacher_id":6,
        "finished":0
        },{
        "student_id":4,
        "name":"zgq",
        "teacher_id":6,
        "finished":0
        },{
        "student_id":5,
        "name":"lxr",
        "teacher_id":6,
        "finished":0
    }],
    "prob":[{
        "problem":"111",
        "total":0
    }]
}

GET /student?id=something

  • @reqParam:
    • student_id integer
  • @resParam:
    • problems

POST /upload-grade

  • @reqParam:
    • id
    • finished(本次已完成的题数)
  • @resParam:
    • status
return status
0: error
1: success

POST /upload-problems

  • @reqParam:
    • id
    • problems
    • num
  • @resParam:
    • status
return status
0: error
1: success

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published