https://github.com/fuma-nama/discord-bot-dashboard-backend
https://github.com/fuma-nama/discord-bot-dashboard-backend
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fuma-nama/discord-bot-dashboard-backend
- Owner: fuma-nama
- Created: 2022-08-08T10:57:47.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T15:47:37.000Z (almost 3 years ago)
- Last Synced: 2025-06-19T00:02:42.077Z (4 months ago)
- Language: Kotlin
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# D-Dash Backend
See the [Frontend](https://github.com/SonMooSans/discord-bot-dashboard) Repository.
Required Models for your own implementation: [models.kt](src/main/kotlin/com/bdash/api/models.kt)
# Routes
GET `login`: Redirects to oauth2 authorize url
GET `callback`: Used for oauth2 redirection
* Set encrypted cookie, and navigate the user to the dashboard home page
GET `guilds`: Fetch user guilds with additional information from bot
* Login Needed
* Returns: `Array`GET `users/@me`: Fetch user information
* Login Needed
* Returns: `User` from [discord documentation](https://discord.com/developers/docs/resources/user#user-object)HEAD `auth`: Check if user logged in
* Response: respond `200` if logged in, otherwise respond `401`
POST `auth/signout`: Sign out
* Login Needed
* Remove auth cookies### ROUTE `guild/{guild}`
Login Needed
Admin Permissions of guild Needed
___
GET: Fetch guild information with specified guild id* Returns: `Guild`
GET `actions`: Get actions data of the guild, won't be called if `config.data.actions` is null
* Returns: `any`, You can define your own Action Data type
GET `features`: Get features data of the guild
* Returns: `Features`
GET `detail`: Fetch Server Details for dashboard
* Returns `any`, You can define your own detail type
GET `detail/advanced`: Only fetched when `config.data.dashboard` has advanced row
* Returns `any`, You can define your own advanced detail type
GET `notification`: Get Notifications for the guild
* Returns `Array`
GET `settings`: Get Settings of the guild
* Returns: `Settings`
PATCH `settings`: Update Settings of the guild
* Body: `Map` updated options
* Returns: `Map` Latest options values### ROUTE `guild/{guild}/feature/{id}`
Login Needed
Admin Permissions of guild Needed
___
GET: Fetch Feature options* Returns `Feature`
PATCH: Update Feature options
* Body: `Map` updated options
* Returns: `Map` Latest options valuesPATCH `enabled`: Set feature enabled
* Response: `200` or `404` if feature doesn't exists
### ROUTE `guild/{guild}/action/{action}`
Login Needed
Admin Permissions of guild Needed
___
GET: Get specified Action Details* Returns: `ActionDetail`
POST: Add new a task to Action
* Returns: `TaskDetail` Created Task details
GET `/{task}`: Get Task details
* Returns: `ActionDetail`
PATCH `/{task}`: Update Task details
* Body: `TaskBody`
* Returns `ActionDetail` Updated task detailsDELETE `/{task}` Delete a Task
* Response: `200` or `404` if action or task doesn't exist