mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-26 09:30:27 +01:00
Fix configs
This commit is contained in:
@@ -126,7 +126,7 @@ export const http: ServerConfig = {
|
|||||||
| to set the header explicitly.
|
| to set the header explicitly.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
forceContentNegotiationToJSON: true,
|
forceContentNegotiationTo: 'application/json',
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ const bodyParserConfig: BodyParserConfig = {
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
form: {
|
form: {
|
||||||
|
convertEmptyStringsToNull: true,
|
||||||
encoding: 'utf-8',
|
encoding: 'utf-8',
|
||||||
limit: '1mb',
|
limit: '1mb',
|
||||||
queryString: {},
|
queryString: {},
|
||||||
@@ -147,6 +148,18 @@ const bodyParserConfig: BodyParserConfig = {
|
|||||||
*/
|
*/
|
||||||
encoding: 'utf-8',
|
encoding: 'utf-8',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Convert empty strings to null
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Convert empty form fields to null. HTML forms results in field string
|
||||||
|
| value when the field is left blank. This option normalizes all the blank
|
||||||
|
| field values to "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
convertEmptyStringsToNull: true,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Max Fields
|
| Max Fields
|
||||||
|
|||||||
@@ -6,10 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Env from '@ioc:Adonis/Core/Env'
|
import Env from '@ioc:Adonis/Core/Env'
|
||||||
import { OrmConfig } from '@ioc:Adonis/Lucid/Orm'
|
|
||||||
import { DatabaseConfig } from '@ioc:Adonis/Lucid/Database'
|
import { DatabaseConfig } from '@ioc:Adonis/Lucid/Database'
|
||||||
|
|
||||||
const databaseConfig: DatabaseConfig & { orm: Partial<OrmConfig> } = {
|
const databaseConfig: DatabaseConfig = {
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Connection
|
| Connection
|
||||||
@@ -48,21 +47,6 @@ const databaseConfig: DatabaseConfig & { orm: Partial<OrmConfig> } = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| ORM Configuration
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Following are some of the configuration options to tweak the conventional
|
|
||||||
| settings of the ORM. For example:
|
|
||||||
|
|
|
||||||
| - Define a custom function to compute the default table name for a given model.
|
|
||||||
| - Or define a custom function to compute the primary key for a given model.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
orm: {
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default databaseConfig
|
export default databaseConfig
|
||||||
|
|||||||
@@ -44,8 +44,9 @@ const mailConfig: MailConfig = {
|
|||||||
*/
|
*/
|
||||||
mailgun: {
|
mailgun: {
|
||||||
driver: 'mailgun',
|
driver: 'mailgun',
|
||||||
baseUrl: `https://api.mailgun.net/v3/${Env.get('MAILGUN_URL')}`,
|
baseUrl: 'https://api.mailgun.net/v3/',
|
||||||
key: Env.get('MAILGUN_API_KEY'),
|
key: Env.get('MAILGUN_API_KEY'),
|
||||||
|
domain: Env.get('MAILGUN_URL'),
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { SessionConfig } from '@ioc:Adonis/Addons/Session'
|
|||||||
|
|
||||||
const sessionConfig: SessionConfig = {
|
const sessionConfig: SessionConfig = {
|
||||||
|
|
||||||
|
enabled: true,
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Driver
|
| Driver
|
||||||
|
|||||||
2
env.ts
2
env.ts
@@ -52,5 +52,5 @@ export default Env.rules({
|
|||||||
|
|
||||||
//Mails
|
//Mails
|
||||||
MAILGUN_API_KEY: Env.schema.string(),
|
MAILGUN_API_KEY: Env.schema.string(),
|
||||||
MAILGUN_URL: Env.schema.string()
|
MAILGUN_URL: Env.schema.string(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
},
|
},
|
||||||
"types": [
|
"types": [
|
||||||
"@adonisjs/core",
|
"@adonisjs/core",
|
||||||
"@adonisjs/env",
|
|
||||||
"@adonisjs/repl",
|
"@adonisjs/repl",
|
||||||
"@adonisjs/redis",
|
"@adonisjs/redis",
|
||||||
"@adonisjs/session",
|
"@adonisjs/session",
|
||||||
|
|||||||
Reference in New Issue
Block a user