Skip to content

Teenager adalah sebuah Learning Management System(LMS) bagi yang mempunyai kekurangan dalam penglihatan dan pendengaran untuk tetap bisa melaksanakan pelajaran seperti orang normal.

Notifications You must be signed in to change notification settings

rg-km/final-project-engineering-12

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Teenager

Tempat Mengajar dan Berbagi Kecerdasan

Teenager adalah sebuah Learning Management System(LMS) bagi yang mempunyai kekurangan dalam penglihatan dan pendengaran untuk tetap bisa melaksanakan pelajaran seperti orang normal. Anda akan dibantu dengan fitur-fitur yang mempermudah anda dalam menerima pelajaran dan mengerjakan tugas. Anda juga bisa menyampaikan pertanyaan dan melakukan konsultasi terkait kesulitan anda saat mempelajari materi atau mengerjakan tugas anda. Let's try with us.
Explore the docs »
Open our project that has been deployed by clicking here »

Table of Contents

About the Project

Logo
Project ini dibuat berdasarkan permasalahan yang ditemukan yaitu pengguna disabilitas kesulitan dalam memanagement pembelajaran yang ada pada LMS lainnya. Dengan adanya project ini, kita berharap dapat mengatasi kesulitan yang dihadapi oleh disabilitas terutama Tuna Netra dan Tuna Rungu dengan fasilitas yang ada pada LMS ini. LMS ini memiliki beberapa fitur, yaitu:

  • Mempelajari materi yang diberikan oleh guru melalui fitur course atau mata pelajaran
  • Mengerjakan tugas yang diberikan oleh guru melalui fitur assignment atau tugas
  • Menyampaikan pertanyaan dan konsultasi terkait kesulitan pembelajaran atau tugas yang diberikan oleh guru melalui fitur diskusi
  • Fitur disabilitas yang berupa Screen Reader

Philosophy Logo

Kami menggunakan logo yang menggambar kepala dengan wajah yang ceria dan bentuk buku berwana biru. Coba Lihat Detail filosofi logo kami lewat link di bawah ini.

Built With

Getting Started

  1. Install Chrome Extension Screen Reader

    Click Here >>

  2. Clone the repo
git clone https://github.com/rg-km/final-project-engineering-12.git
  1. Go to frontend
cd frontend
  1. Install dependencies
install npm
  1. Starting
npm start
  1. Go to backend
cd ../backend
  1. Run Go Main
go run main.go

Collaborators


Irfan Kurniawan

Mohd Ryan Obillah

Umbu Theofilus Dendimara

Widdy Arfiansyah

Muhammad Abid Fajar

Rudiansyah Wijaya Pratama

API Specification

All API must use this authentication Request:

  • Header:
    • X-Api-Key: "your secret api key"

SUMMARY:

There are a total of 54 APIs

users


Create Users


Request:

  • Method: POST
  • Endpoint: /api/users
  • Header:
    • Content-Type: application/json
    • Accept: application/json
  • Body:
    {
        "name": "string",
        "username": "string",
        "email": "string",
        "password": "string",
        "role": "integer", // enum (1, 2)
        "phone": "string",
        "gender": "integer", // enum (1, 2)
        "type_of_disability": "integer", // enum (0, 1, 2)
        "birthdate": "date"
    }

Response:

    {   
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary
            "name": "string",
            "username": "string", // unique
            "email": "string", // unique
            "password": "string",
            "role": "integer", // enum(1, 2)
            "phone": "string",
            "gender": "integer", // enum (1, 2)
            "type_of_disability": "integer", // enum (0, 1, 2)
            "birthdate": "string",
            "email_verification": "timestamp",
            "created_at": "timestamp",
            "updated_at": "timestamp"
        }
    }

Users Login


Request:

  • Method: POST
  • Endpoint: /api/users/login
  • Header:
    • Content-Type: application/json
    • Accept: application/json
  • Body:
    {
        "email": "string",
        "password": "string"
    }

Response:

    {   
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary
            "name": "string",
            "username": "string", // unique
            "email": "string", // unique
            "role": "integer", // enum(1, 2)
            "gender": "integer",
            "type_of_disability" : "integer" // enum
        }
    }

Get User Status


Request:

  • Method: GET
  • Endpoint: /api/userstatus
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token

Response:

    {   
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary
            "name": "string",
            "username": "string", // unique
            "email": "string", // unique
            "role": "integer", // enum(1, 2)
            "gender": "integer",
            "type_of_disability" : "integer", // enum
            "address" : "string",
            "birthdate" : "string",
            "image" : "string",
            "description" : "string"
        }
    }

User Logout


Request:

  • Method: POST
  • Endpoint: /api/users/logout
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token

Response:

    {   
        "code" : "number",
        "status" : "string"
    }

Get Users


Request:

  • Method: GET
  • Endpoint: /api/users/{id}
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Variable:
    • id: integer

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary
            "name": "string",
            "username": "string", // unique
            "role": "integer", // enum(1, 2)
            "phone": "string",
            "gender": "integer", // enum (1, 2)
            "type_of_disability": "integer", // enum (0, 1, 2)
            "address": "string",
            "birthdate": "string",
            "image": "string",
            "description": "string"
        }
    }

Update Users


Request:

  • Method: PUT
  • Endpoint: /api/users/{id}
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Variable:
    • id: integer
  • Body:
    {
        "name": "string",
        "username": "string", // unique
        "role": "integer", // enum (1, 2)
        "phone": "string",
        "gender": "integer", // enum (1, 2)
        "type_of_disability": "integer", // enum (0, 1, 2)
        "address": "string",
        "birthdate": "string",
        "image": "string",
        "description": "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary
            "name": "string",
            "username": "string", // unique
            "role": "integer", // enum(1, 2)
            "phone": "string",
            "gender": "string", // enum (1, 2)
            "type_of_disability": "integer", // enum(0, 1, 2)
            "address": "string",
            "birthdate": "string",
            "image": "string",
            "description": "string"
        }
    }

Update Users Role


Request:

  • Method: PUT
  • Endpoint: /api/users/roleupdate/{id}
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Variable:
    • id: integer

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "name" : "string",
            "username" : "string", // unique
            "role" : "integer", // enum(1,2)
            "phone" : "string",
            "gender" : "integer", // enum(1,2)
            "type_of_disability": "integer", // enum(0,1,2)
            "address": "string",
            "birthdate": "string",
            "image": "string",
            "description": "string"
        }
    }

List Users


Request:

  • Method: GET
  • Endpoint: /api/users
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • size : number
    • page : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id": "integer", // primary
                "name": "string",
                "username": "string", // unique
                "role": "integer", // enum(1, 2)
                "phone": "string",
                "gender": "integer", // enum(1, 2)
                "type_of_disability": "integer", // enum(0, 1, 2)
                "address": "string",
                "birthdate": "string",
                "image": "string",
                "description": "string"
            },
        ]
    }

Delete Users


Request:

  • Method: DELETE
  • Endpoint: /api/users/{id}
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Variable:
    • id: integer

Response:

    {
        "code" : "number",
        "status" : "string"
    }

List User Submission


Request:

  • Method: GET
  • Endpoint: /api/users/submissions
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • limit : number optional default = all list

Response:

    {
        "id_module_submission": "integer",
        "name_course": "string",
        "name_module_submission": "string",
        "grade": "integer",
        "file": "string"
    }

Verify Email User


Request:

  • Method: GET
  • Endpoint: /api/users/verify?email=&signature=
  • Header:
    • Accept: application/json
  • Query Param:
    • signature : string required
    • email : string required

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : null
    }

User course


Create User_course


Request:

  • Method: POST
  • Endpoint: /api/usercourse
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "user_id" : "integer", // foreign key1
        "course_id" : "integer" // foreign key2
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "user_id" : "integer", // foreign key1
            "course_id" : "integer" // foreign key2
        }
    }

Get User_course


Request:

  • Method: GET
  • Endpoint: /api/usercourse/{id}/{course}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "user_id" : "integer", // foreign key1
            "course_id" : "integer" // foreign key2
        }
    }

List User_course


Request:

  • Method: GET
  • Endpoint: /api/usercourse
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • size : number
    • page : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "user_id" : "integer", // foreign key1
                "course_id" : "integer" // foreign key2
            },
        ]
    }

Delete User_course


Request:

  • Method: DELETE
  • Endpoint: /api/usercourse/{user_id}/{course_id}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string"
    }

Find All Course By User Logged In


Request:

  • Method: GET
  • Endpoint: /api/usercourse/courses
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id_course": "integer", // Primary Key
            "course_name": "string",
            "course_code": "string",
            "course_class": "string"
        }
    }

Courses


Create Courses


Request:

  • Method: POST
  • Endpoint: /api/courses
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name" : "string",
        "code_course" : "string", // unique
        "class" : "string",
        "tools" : "string", // longtext
        "about" : "string", // longtext
        "description" : "string" // longtext
    } 

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "name" : "string",
            "code_course" : "string", // unique
            "class" : "string",
            "tools" : "string", // longtext
            "about" : "string", // longtext
            "is_active" : "boolean",
            "description" : "string", // longtext
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp 
        }
    }

Get All courses


Request:

  • Method: GET
  • Endpoint: /api/courses
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • size : number
    • page : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "name" : "string",
                "code_course" : "string", // unique
                "class" : "string",
                "tools" : "string", // longtext
                "about" : "string", // longtext
                "is_active" : "boolean",
                "description" : "string", // longtext
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp 
            },
        ]
    }

Get Courses


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "name" : "string",
            "code_course" : "string", // unique
            "class" : "string",
            "tools" : "string", // longtext
            "about" : "string", // longtext
            "description" : "string", // longtext
            "is_active" : "boolean",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp 
        }
    }

Update Courses


Request:

  • Method: PATCH
  • Endpoint: /api/courses/{code}
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name" : "string",
        "class" : "string",
        "tools" : "string", // longtext
        "about" : "string", // longtext
        "description" : "string" // longtext
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "name" : "string",
            "code_course" : "string", // unique
            "class" : "string",
            "tools" : "string", // longtext
            "about" : "string", // longtext
            "description" : "string", // longtext
            "is_active" : "boolean",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp 
        }
    }

List Courses


Request:

  • Method: GET
  • Endpoint: /api/courses?status=true&limit=1
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • status : boolean optional default = true
    • limit : number optional default = all list

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "name" : "string",
                "code_course" : "string", // unique
                "class" : "string",
                "tools" : "string", // longtext
                "about" : "string", // longtext
                "description" : "string", // longtext
                "is_active" : "boolean",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp 
            },
        ]
    }

Delete Courses


Request:

  • Method: DELETE
  • Endpoint: /api/courses/{code}
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • code : string

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : null
    }

Deactivate Courses


Request:

  • Method: PATCH
  • Endpoint: /api/courses/{code}/status
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • code : string
  • Body:
    {
        "is_active" : "boolean",
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : null
    }

List Users In Course Detail


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/users
  • Query Param:
    • code : string
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id_user": "integer", // primary key
            "user_name": "string",
            "user_username": "string",
            "user_email": "string"
        }
    }

Module submissions


Create Module_submissions


Request:

  • Method: POST
  • Endpoint: /api/courses/{code}/submissions
  • Query Param:
    • code : string
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name": "string",
        "description": "string",
        "deadline": "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "course_id": "integer", // foreign key
            "name": "string",
            "description": "string",
            "deadline": "string"
        }
    }

Get Module_submissions


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/submissions/{submissionId}
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "course_id": "integer", // foreign key
            "name": "string",
            "description": "string",
            "deadline": "string"
        }
    }

Update Module_submissions


Request:

  • Method: PATCH
  • Endpoint: /api/courses/{code}/submissions/{submissionId}
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name": "string",
        "description": "string",
        "deadline": "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "course_id": "integer", // foreign key
            "name": "string",
            "description": "string",
            "deadline": "string"
        }
    }

List Module_submissions


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/submissions
  • Query Param:
    • code : string
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
              "id" : "integer", // primary key
              "course_id": "integer", // foreign key
              "name": "string",
              "description": "string",
              "deadline": "string"
            },
        ]
    }

Delete Module_submissions


Request:

  • Method: DELETE
  • Endpoint: /api/courses/{code}/submissions/{submissionId}
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string"
        "data": null
    }

Next Module_submissions


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/submissions/{submissionId}/next
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": {
            "id": "integer", // primary key
            "code_course": "string",
        }
    }

Previous Module_submissions


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/submissions/{submissionId}/previous
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": {
            "id": "integer", // primary key
            "code_course": "string",
        }
    }

List User Module_submissions In Teacher


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/submissions/{submissionId}/get
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": {
            "id_user_submission": "integer", // primary key
            "user_name": "string",
            "module_submission_name": "string",
            "file": "string"
        }
    }

Module articles


Create Module_articles


Request:

  • Method: POST
  • Endpoint: /api/courses/{code}/articles
  • Query Param:
    • code : string
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name": "string",
        "content": "string",
        "estimate": "integer"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary key
            "course_id": "integer", // foreign key 
            "name": "string",
            "content": "string",
            "estimate": "integer"
        }
    }

Get Module_articles


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/articles/{articleId}
  • Query Param:
    • code : string
    • articleId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id": "integer", // primary key
            "course_id": "integer", // foreign key 
            "name": "string",
            "content": "string",
            "estimate": "integer"
        }
    }

Update Module_articles


Request:

  • Method: PATCH
  • Endpoint: /api/courses/{code}/articles/{articleId}
  • Query Param:
    • code : string
    • articleId : number
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "name": "string",
        "content": "string",
        "estimate": "integer"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "course_id": "integer", // foreign key 
            "name": "string",
            "content": "string",
            "estimate": "integer"
        }
    }

List Module_articles


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/articles
  • Query Param:
    • code : string
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "course_id": "integer", // foreign key 
                "name": "string",
                "content": "string",
                "estimate": "integer"
            },
        ]
    }

Delete Module_articles


Request:

  • Method: DELETE
  • Endpoint: /api/courses/{code}/articles/{articleId}
  • Query Param:
    • code : string
    • articleId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": null
    }

Next Module_articles


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/articles/{articleId}/next
  • Query Param:
    • code : string
    • articleId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": {
            "id": "integer", // primary key
            "code_course": "string",
        }
    }

Previous Module_articles


Request:

  • Method: GET
  • Endpoint: /api/courses/{code}/articles/{articleId}/previous
  • Query Param:
    • code : string
    • articleId : number
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data": {
            "id": "integer", // primary key
            "code_course": "string",
        }
    }

User Submissions


Submit File


Request:

  • Method: POST
  • Endpoint: /api/courses/:code/submissions/:submissionId/user-submit
  • Query Param:
    • code : string
    • submissionId : number
  • Header:
    • Content-Type: multipart/form-data
    • Authorization: Token
  • Body:
    {
        "file" : "string",
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "user_id" : "integer", // foreign key1
            "module_submission_id" : "integer", //foreign key2
            "file" : "string"
        }
    }

Update Grade


Request:

  • Method: PATCH
  • Endpoint: /api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
  • Query Param:
    • code : string
    • submissionId : number
    • userSubmissionId : number
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "grade" : "integer",
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : null
    }

Get User Submission


Request:

  • Method: GET
  • Endpoint: /api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
  • Query Param:
    • code : string
    • submissionId : number
    • userSubmissionId : number
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "user_id" : "integer", // foreign key1
            "module_submission_id" : "integer", //foreign key2
            "file" : "string",
            "grade" : "integer"
        }
    }

Download User Submission


Request:

  • Method: POST
  • Endpoint: /api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId/download
  • Query Param:
    • code : string
    • submissionId : number
    • userSubmissionId : number
  • Header:
    • Content-Type: {mimetype}
    • Content-Disposition: {attachment; filename=file}
    • Authorization: Token

Answers


Create Answers


Request:

  • Method: POST
  • Endpoint: /api/answers/create
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "question_id" : "integer", // foreign key1
        "user_id" : "integer", // foreign key2
        "description" : "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "question_id" : "integer", // foreign key1
            "user_id" : "integer", // foreign key2
            "description" : "string",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp
        }
    }

Get Answers


Request:

  • Method: GET
  • Endpoint: /api/answers/by-user/{userId}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "question_id" : "integer", // foreign key1
            "user_id" : "integer", // foreign key2
            "description" : "string",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp
        }
    }

Update Answers


Request:

  • Method: PUT
  • Endpoint: /api/answers/update/{answerId}
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "question_id" : "integer", // foreign key1
        "user_id" : "integer", // foreign key2
        "description" : "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "question_id" : "integer", // foreign key1
            "user_id" : "integer", // foreign key2
            "description" : "string",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp
        }
    }

List Answers


Request:

  • Method: GET
  • Endpoint: /api/answers/all
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • size : number
    • page : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "question_id" : "integer", // foreign key1
                "user_id" : "integer", // foreign key2
                "description" : "string",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp
            },
        ]
    }

Delete Answers


Request:

  • Method: DELETE
  • Endpoint: /api/answers/{answerId}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string"
    }

Get Answers By Question Id


Request:

  • Method: GET
  • Endpoint: /api/answers/{questionId}
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • questionId : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "question_id" : "integer", // foreign key1
                "user_id" : "integer", // foreign key2
                "description" : "string",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp
            },
        ]
    }

Questions


Create Questions


Request:

  • Method: POST
  • Endpoint: /api/questions/create
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "module_id" : "integer", // foreign key1
        "user_id" : "integer", // foreign key2
        "title" : "string",
        "tags" : "string",
        "description" : "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "module_id" : "integer", // foreign key1
            "user_id" : "integer", // foreign key2
            "title" : "string",
            "tags" : "string",
            "description" : "string",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp
        }
    }

Get Questions


Request:

  • Method: GET
  • Endpoint: /api/questions/by-user/{userId}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
                "id" : "integer", // primary key
                "course_id" : "integer", // foreign key1
                "course_name" : "string",
                "user_id" : "integer", // foreign key2
                "user_name" : "string",
                "title" : "string",
                "tags" : "string",
                "description" : "string",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp
        }
    }

Update Questions


Request:

  • Method: PUT
  • Endpoint: /api/questions/update/{questionId}
  • Header:
    • Content-Type: application/json
    • Accept: application/json
    • Authorization: Token
  • Body:
    {
        "module_id" : "integer", // foreign key1
        "user_id" : "integer", // foreign key2
        "title" : "string",
        "tags" : "string",
        "description" : "string"
    }

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
            "id" : "integer", // primary key
            "module_id" : "integer", // foreign key1
            "user_id" : "integer", // foreign key2
            "title" : "string",
            "tags" : "string",
            "description" : "string",
            "created_at" : "timestamp", // timestamp
            "updated_at" : "timestamp" // timestamp
        }
    }

List Questions


Request:

  • Method: GET
  • Endpoint: /api/questions/all
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • size : number
    • page : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : [
            {
                "id" : "integer", // primary key
                "course_id" : "integer", // foreign key1
                "course_name" : "string",
                "user_id" : "integer", // foreign key2
                "user_name" : "string",
                "title" : "string",
                "tags" : "string",
                "description" : "string",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp
            },
        ]
    }

Delete Questions


Request:

  • Method: DELETE
  • Endpoint: /api/questions/{questionId}
  • Header:
    • Accept: application/json
    • Authorization: Token

Response:

    {
        "code" : "number",
        "status" : "string"
    }

Get Question By Id


Request:

  • Method: GET
  • Endpoint: /api/questions/{id}
  • Header:
    • Accept: application/json
    • Authorization: Token
  • Query Param:
    • id : number

Response:

    {
        "code" : "number",
        "status" : "string",
        "data" : {
                "id" : "integer", // primary key
                "course_id" : "integer", // foreign key1
                "course_name" : "string",
                "user_id" : "integer", // foreign key2
                "user_name" : "string",
                "title" : "string",
                "tags" : "string",
                "description" : "string",
                "created_at" : "timestamp", // timestamp
                "updated_at" : "timestamp" // timestamp
        },
    }

About

Teenager adalah sebuah Learning Management System(LMS) bagi yang mempunyai kekurangan dalam penglihatan dan pendengaran untuk tetap bisa melaksanakan pelajaran seperti orang normal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 60.3%
  • JavaScript 39.1%
  • Other 0.6%