- update to AdonisJS 6
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m15s

This commit is contained in:
Kaimbacher 2024-03-14 20:25:27 +01:00
parent f828ca4491
commit cb51a4136f
167 changed files with 21485 additions and 21212 deletions

View file

@ -1,4 +1,4 @@
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
import type { HttpContext } from '@adonisjs/core/http';
import { StatusCodes } from 'http-status-codes';
// import * as fs from 'fs';
// import * as path from 'path';
@ -7,7 +7,7 @@ const prefixes = ['von', 'van'];
// node ace make:controller Author
export default class AvatarController {
public async generateAvatar({ request, response }: HttpContextContract) {
public async generateAvatar({ request, response }: HttpContext) {
try {
const { name, background, textColor, size } = request.only(['name', 'background', 'textColor', 'size']);
@ -40,7 +40,7 @@ export default class AvatarController {
}
}
private getInitials(name) {
private getInitials(name: string) {
const parts = name.split(' ');
let initials = '';