mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Lint project
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Announce from 'App/Models/Announce'
|
||||
import AnnounceUpdateValidator from 'App/Validators/announce/AnnounceUpdateValidator'
|
||||
import File from 'App/Models/File'
|
||||
@@ -25,7 +25,8 @@ export default class AnnouncesController {
|
||||
await announce.related('message').associate(await getTranslation(data.code))
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await announce.related('cover').associate(cover)
|
||||
if (cover)
|
||||
await announce.related('cover').associate(cover)
|
||||
|
||||
await announce.merge(data).save()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import AuthValidator from 'App/Validators/AuthValidator'
|
||||
|
||||
export default class AuthController {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Experience from 'App/Models/Experience'
|
||||
import ExperienceStoreValidator from 'App/Validators/experience/ExperienceStoreValidator'
|
||||
import ExperienceUpdateValidator from 'App/Validators/experience/ExperienceUpdateValidator'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Application from '@ioc:Adonis/Core/Application'
|
||||
import File from 'App/Models/File'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import FormationStoreValidator from 'App/Validators/formation/FormationStoreValidator'
|
||||
import FormationUpdateValidator from 'App/Validators/formation/FormationUpdateValidator'
|
||||
import Formation from 'App/Models/Formation'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import FormStoreValidator from 'App/Validators/form/FormStoreValidator'
|
||||
import Form from 'App/Models/Form'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Information from 'App/Models/Information'
|
||||
import InformationUpdateValidator from 'App/Validators/information/InformationUpdateValidator'
|
||||
import { getTranslation } from 'App/Utils/TranslationsUtils'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Location from 'App/Models/Location'
|
||||
import LocationValidator from 'App/Validators/location/LocationValidator'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Maintenance from 'App/Models/Maintenance'
|
||||
import MaintenanceUpdateValidator from 'App/Validators/maintenance/MaintenanceUpdateValidator'
|
||||
import { getTranslation } from 'App/Utils/TranslationsUtils'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import PostColor from 'App/Models/PostColor'
|
||||
import PostColorStoreValidator from 'App/Validators/postColor/PostColorStoreValidator'
|
||||
import PostColorUpdateValidator from 'App/Validators/postColor/PostColorUpdateValidator'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Post from 'App/Models/Post'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import PostUpdateValidator from 'App/Validators/post/PostUpdateValidator'
|
||||
import File from 'App/Models/File'
|
||||
import PostStoreValidator from 'App/Validators/post/PostStoreValidator'
|
||||
@@ -90,10 +90,12 @@ export default class PostsController {
|
||||
await post.related('content').associate(await getTranslation(data.content!))
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await post.related('cover').associate(cover)
|
||||
if (cover)
|
||||
await post.related('cover').associate(cover)
|
||||
|
||||
const color = await PostColor.findBy('name', data.color)
|
||||
if (color) await post.related('color').associate(color)
|
||||
if (color)
|
||||
await post.related('color').associate(color)
|
||||
|
||||
return response.status(200).send({
|
||||
post,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ProfileController {
|
||||
public me({ response }: HttpContextContract) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Project from 'App/Models/Project'
|
||||
import ProjectStoreValidator from 'App/Validators/project/ProjectStoreValidator'
|
||||
import ProjectUpdateValidator from 'App/Validators/project/ProjectUpdateValidator'
|
||||
@@ -49,9 +49,11 @@ export default class ProjectsController {
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
|
||||
await project.merge(data).save()
|
||||
if (cover) await project.related('cover').associate(cover)
|
||||
if (cover)
|
||||
await project.related('cover').associate(cover)
|
||||
|
||||
if (data.description) await project.related('description').associate(await getTranslation(data.description))
|
||||
if (data.description)
|
||||
await project.related('description').associate(await getTranslation(data.description))
|
||||
|
||||
await project.related('tags').sync(data.tags!)
|
||||
return response.status(200).send({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import File from 'App/Models/File'
|
||||
import Skill from 'App/Models/Skill'
|
||||
import SkillStoreValidator from 'App/Validators/skill/SkillStoreValidator'
|
||||
@@ -19,7 +19,8 @@ export default class SkillsController {
|
||||
const skill = await Skill.create(data)
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await skill.related('file').associate(cover)
|
||||
if (cover)
|
||||
await skill.related('file').associate(cover)
|
||||
|
||||
return response.status(200).send({
|
||||
skill,
|
||||
@@ -39,7 +40,8 @@ export default class SkillsController {
|
||||
const skill = await Skill.findOrFail(params.id)
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await skill.related('file').associate(cover)
|
||||
if (cover)
|
||||
await skill.related('file').associate(cover)
|
||||
await skill.merge(data).save()
|
||||
|
||||
return response.status(200).send({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import {
|
||||
fetchTopArtist, fetchTopTracks,
|
||||
getAuthorizationURI,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Redis from '@ioc:Adonis/Addons/Redis'
|
||||
import StateSleepingValidator from 'App/Validators/states/StateSleepingValidator'
|
||||
import { getCurrentPlayingFromCache } from 'App/Utils/SongUtils'
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import CommandsRun from 'App/Models/CommandsRun'
|
||||
import BuildsRun from 'App/Models/BuildsRun'
|
||||
import {
|
||||
NOW,
|
||||
fetchDailyStatistics,
|
||||
fetchMonthlyStatistics,
|
||||
fetchStatistics,
|
||||
fetchWeeklyStatistics,
|
||||
NOW,
|
||||
} from 'App/Utils/StatsUtils'
|
||||
|
||||
export default class StatsController {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Subscriber from 'App/Models/Subscriber'
|
||||
import SubscriberStoreValidator from 'App/Validators/subscriber/SubscriberStoreValidator'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import TagStoreValidator from 'App/Validators/tag/TagStoreValidator'
|
||||
import TagUpdateValidator from 'App/Validators/tag/TagUpdateValidator'
|
||||
import Tag from 'App/Models/Tag'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import Translation from 'App/Models/Translation'
|
||||
import TranslationStoreValidator from 'App/Validators/translation/TranslationStoreValidator'
|
||||
import TranslationUpdateValidator from 'App/Validators/translation/TranslationUpdateValidator'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import User from 'App/Models/User'
|
||||
import UserStoreValidator from 'App/Validators/user/UserStoreValidator'
|
||||
import UserUpdateValidator from 'App/Validators/user/UserUpdateValidator'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { BaseMailer, MessageContract } from '@ioc:Adonis/Addons/Mail'
|
||||
import type { MessageContract } from '@ioc:Adonis/Addons/Mail'
|
||||
import { BaseMailer } from '@ioc:Adonis/Addons/Mail'
|
||||
|
||||
export default class FormConfirmation extends BaseMailer {
|
||||
constructor(private name: string, private email: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { AuthenticationException } from '@adonisjs/auth/build/standalone'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
/**
|
||||
* Silent auth middleware can be used as a global middleware to silent check
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import File from 'App/Models/File'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
export default class Experience extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class File extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class Form extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
export default class Formation extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
export default class Information extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class Location extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
export default class Maintenance extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column, manyToMany, ManyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo, ManyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column, manyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Tag from 'App/Models/Tag'
|
||||
import Translation from 'App/Models/Translation'
|
||||
import File from 'App/Models/File'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class PostColor extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column, ManyToMany, manyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo, ManyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column, manyToMany } from '@ioc:Adonis/Lucid/Orm'
|
||||
import File from 'App/Models/File'
|
||||
import Tag from 'App/Models/Tag'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import File from 'App/Models/File'
|
||||
|
||||
export default class Skill extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class Subscriber extends BaseModel {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import { BaseModel, BelongsTo, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import type { DateTime } from 'luxon'
|
||||
import type { BelongsTo } from '@ioc:Adonis/Lucid/Orm'
|
||||
import { BaseModel, belongsTo, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
import Translation from 'App/Models/Translation'
|
||||
|
||||
export default class Tag extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
export default class Translation extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon'
|
||||
import type { DateTime } from 'luxon'
|
||||
import Hash from '@ioc:Adonis/Core/Hash'
|
||||
import { BaseModel, beforeSave, column } from '@ioc:Adonis/Lucid/Orm'
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||
import type { AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||
import axios from 'axios'
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import Redis from '@ioc:Adonis/Addons/Redis'
|
||||
import { SpotifyArtist, SpotifyTrack } from 'App/Types/ILocalSpotify'
|
||||
import { Artist, InternalPlayerResponse, Item, PlayerResponse, SpotifyToken } from 'App/Types/ISpotify'
|
||||
import type { SpotifyArtist, SpotifyTrack } from 'App/Types/ILocalSpotify'
|
||||
import type { Artist, InternalPlayerResponse, Item, PlayerResponse, SpotifyToken } from 'App/Types/ISpotify'
|
||||
import queryString from 'query-string'
|
||||
import { updateGithubReadmeSpotify } from 'App/Utils/UpdateGithubReadme'
|
||||
|
||||
@@ -103,7 +104,8 @@ export async function getCurrentPlayingFromCache(): Promise<InternalPlayerRespon
|
||||
}
|
||||
|
||||
export async function getCurrentPlayingFromSpotify(): Promise<InternalPlayerResponse> {
|
||||
if ((await getSpotifyAccount()).access_token === '') return { is_playing: false }
|
||||
if ((await getSpotifyAccount()).access_token === '')
|
||||
return { is_playing: false }
|
||||
const current_track = await RequestWrapper<PlayerResponse>('https://api.spotify.com/v1/me/player?additional_types=track,episode')
|
||||
|
||||
let current: InternalPlayerResponse
|
||||
|
||||
@@ -3,7 +3,7 @@ import axios from 'axios'
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import Redis from '@ioc:Adonis/Addons/Redis'
|
||||
import Logger from '@ioc:Adonis/Core/Logger'
|
||||
import { StatesResponse } from 'App/Types/IStates'
|
||||
import type { StatesResponse } from 'App/Types/IStates'
|
||||
|
||||
export async function fetchDevelopingState(): Promise<void> {
|
||||
try {
|
||||
@@ -26,7 +26,8 @@ export async function fetchDevelopingState(): Promise<void> {
|
||||
|
||||
if (redis_state !== active) {
|
||||
await Redis.set('states:developing', String(active))
|
||||
if (redis_state) await Redis.set('states:sleeping', 'false')
|
||||
if (redis_state)
|
||||
await Redis.set('states:sleeping', 'false')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DevelopmentHour from 'App/Models/DevelopmentHour'
|
||||
import CommandsRun from 'App/Models/CommandsRun'
|
||||
import BuildsRun from 'App/Models/BuildsRun'
|
||||
import { Stats, Time } from 'App/Types/IStats'
|
||||
import type { Stats, Time } from 'App/Types/IStats'
|
||||
|
||||
function formatDate(date: Date): string {
|
||||
return date.toISOString().split('T')[0]
|
||||
|
||||
@@ -7,9 +7,9 @@ import {
|
||||
fetchStatistics,
|
||||
fetchWeeklyStatistics,
|
||||
} from 'App/Utils/StatsUtils'
|
||||
import { Stats } from 'App/Types/IStats'
|
||||
import type { Stats } from 'App/Types/IStats'
|
||||
import { getCurrentPlayingFromCache } from 'App/Utils/SongUtils'
|
||||
import { GithubReason, GithubRequest } from 'App/Types/IGithub'
|
||||
import type { GithubReason, GithubRequest } from 'App/Types/IGithub'
|
||||
|
||||
export async function updateGithubReadmeStats(): Promise<void> {
|
||||
const daily_stats = await fetchDailyStatistics()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class AuthValidator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class AnnounceUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ExperienceStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ExperienceUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class FormStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class FormationStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class FormationUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class InformationUpdateValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class LocationValidator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class MaintenanceUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class PostStoreValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class PostUpdateValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class PostColorStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class PostColorUpdateValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ProjectStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ProjectUpdateValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class SkillStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class SkillUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class SongRangeValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class StateSleepingValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class SubscriberStoreValidator {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class TagStoreValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class TagUpdateValidator {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class TranslationStoreValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class TranslationUpdateValidator {
|
||||
public schema = schema.create({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class UserStoreValidator {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class UserUpdateValidator {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
import proxyAddr from 'proxy-addr'
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { ServerConfig } from '@ioc:Adonis/Core/Server'
|
||||
import { LoggerConfig } from '@ioc:Adonis/Core/Logger'
|
||||
import { ProfilerConfig } from '@ioc:Adonis/Core/Profiler'
|
||||
import { ValidatorConfig } from '@ioc:Adonis/Core/Validator'
|
||||
import type { ServerConfig } from '@ioc:Adonis/Core/Server'
|
||||
import type { LoggerConfig } from '@ioc:Adonis/Core/Logger'
|
||||
import type { ProfilerConfig } from '@ioc:Adonis/Core/Profiler'
|
||||
import type { ValidatorConfig } from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
import { AuthConfig } from '@ioc:Adonis/Addons/Auth'
|
||||
import type { AuthConfig } from '@ioc:Adonis/Addons/Auth'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
import { BodyParserConfig } from '@ioc:Adonis/Core/BodyParser'
|
||||
import type { BodyParserConfig } from '@ioc:Adonis/Core/BodyParser'
|
||||
|
||||
const bodyParserConfig: BodyParserConfig = {
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
import { CorsConfig } from '@ioc:Adonis/Core/Cors'
|
||||
import type { CorsConfig } from '@ioc:Adonis/Core/Cors'
|
||||
|
||||
const corsConfig: CorsConfig = {
|
||||
/*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { DatabaseConfig } from '@ioc:Adonis/Lucid/Database'
|
||||
import type { DatabaseConfig } from '@ioc:Adonis/Lucid/Database'
|
||||
|
||||
const databaseConfig: DatabaseConfig = {
|
||||
/*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { HashConfig } from '@ioc:Adonis/Core/Hash'
|
||||
import type { HashConfig } from '@ioc:Adonis/Core/Hash'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { MailConfig } from '@ioc:Adonis/Addons/Mail'
|
||||
import type { MailConfig } from '@ioc:Adonis/Addons/Mail'
|
||||
|
||||
const mailConfig: MailConfig = {
|
||||
/*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { RedisConfig } from '@ioc:Adonis/Addons/Redis'
|
||||
import type { RedisConfig } from '@ioc:Adonis/Addons/Redis'
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import { SessionConfig } from '@ioc:Adonis/Addons/Session'
|
||||
import type { SessionConfig } from '@ioc:Adonis/Addons/Session'
|
||||
|
||||
const sessionConfig: SessionConfig = {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
import User from 'App/Models/User'
|
||||
import type User from 'App/Models/User'
|
||||
|
||||
declare module '@ioc:Adonis/Addons/Auth' {
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
import { actions, policies } from '../start/bouncer'
|
||||
import type { actions, policies } from '../start/bouncer'
|
||||
|
||||
declare module '@ioc:Adonis/Addons/Bouncer' {
|
||||
type ApplicationActions = ExtractActionsTypes<typeof actions>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
declare module '@ioc:Adonis/Addons/Mail' {
|
||||
import { MailDrivers } from '@ioc:Adonis/Addons/Mail'
|
||||
import type { MailDrivers } from '@ioc:Adonis/Addons/Mail'
|
||||
|
||||
interface MailersList {
|
||||
smtp: MailDrivers['smtp']
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApplicationContract } from '@ioc:Adonis/Core/Application'
|
||||
import type { ApplicationContract } from '@ioc:Adonis/Core/Application'
|
||||
import Logger from '@ioc:Adonis/Core/Logger'
|
||||
export default class AppProvider {
|
||||
public static needsApplication = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import Route from '@ioc:Adonis/Core/Route'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import HealthCheck from '@ioc:Adonis/Core/HealthCheck'
|
||||
|
||||
const BASE_URL = Env.get('BASE_URL')
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"@adonisjs/lucid",
|
||||
"@adonisjs/mail",
|
||||
"@adonisjs/view",
|
||||
"@adonisjs/bouncer",
|
||||
"@adonisjs/bouncer"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user