mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-26 01:20:27 +01:00
Fix Redis
This commit is contained in:
@@ -5,10 +5,10 @@ import {UpdateGitHubReadme} from "App/tasks/UpdateGithubReadme";
|
|||||||
export default class StatesController {
|
export default class StatesController {
|
||||||
|
|
||||||
public async get ({response}: HttpContextContract) {
|
public async get ({response}: HttpContextContract) {
|
||||||
const is_sleeping = Boolean(await Redis.get('artapi/state/sleeping')) || false
|
const is_sleeping = Boolean(await Redis.get('artapi/states/sleeping')) || false
|
||||||
const is_learning = Boolean(await Redis.get('artapi/state/learning')) || false
|
const is_learning = Boolean(await Redis.get('artapi/states/learning')) || false
|
||||||
const is_developing = Boolean(await Redis.get('artapi/state/developing')) || false
|
const is_developing = Boolean(await Redis.get('artapi/states/developing')) || false
|
||||||
const is_listening_music = Boolean(await Redis.get('artapi/state/listening')) || false
|
const is_listening_music = Boolean(await Redis.get('artapi/states/listening')) || false
|
||||||
|
|
||||||
return response.status(200).send({
|
return response.status(200).send({
|
||||||
is_sleeping,
|
is_sleeping,
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ export async function UpdateGitHubReadme(): Promise<void> {
|
|||||||
const monthly = await getMonthlyStats()
|
const monthly = await getMonthlyStats()
|
||||||
const total_stats = await getTotalStats()
|
const total_stats = await getTotalStats()
|
||||||
|
|
||||||
const sleeping = Boolean(await Redis.get('artapi/state/sleeping')) || false
|
const sleeping = Boolean(await Redis.get('artapi/states/sleeping')) || false
|
||||||
const learning = Boolean(await Redis.get('artapi/state/learning')) || false
|
const learning = Boolean(await Redis.get('artapi/states/learning')) || false
|
||||||
const developing = Boolean(await Redis.get('artapi/state/developing')) || false
|
const developing = Boolean(await Redis.get('artapi/states/developing')) || false
|
||||||
const listening_music = Boolean(await Redis.get('artapi/state/listening')) || false
|
const listening_music = Boolean(await Redis.get('artapi/states/listening')) || false
|
||||||
|
|
||||||
const stats_table = `| Statistics | Daily | Weekly | Monthly | Total |
|
const stats_table = `| Statistics | Daily | Weekly | Monthly | Total |
|
||||||
| :------------------------------------------ | ----------: | ----------: | -----------: | -----------: |
|
| :------------------------------------------ | ----------: | ----------: | -----------: | -----------: |
|
||||||
|
|||||||
Reference in New Issue
Block a user