Compare commits

..

No commits in common. "ad11b7abec493d617e2d7e546b68ff44aa2484e5" and "1ffe22be10b1542708423adf8898a6265a8048fc" have entirely different histories.

10 changed files with 15 additions and 75 deletions

6
.gitignore vendored
View File

@ -9,8 +9,4 @@ tmp
.env .env
# The development sqlite file # The development sqlite file
database/*.sqlite database/development.sqlite
# VSCode & Webstorm history directories
.history
.idea

View File

@ -1,17 +0,0 @@
'use strict'
class ConvertEmptyStringsToNull {
async handle ({ request }, next) {
if (Object.keys(request.body).length) {
request.body = Object.assign(
...Object.keys(request.body).map(key => ({
[key]: request.body[key] !== '' ? request.body[key] : null
}))
)
}
await next()
}
}
module.exports = ConvertEmptyStringsToNull

View File

@ -1,16 +0,0 @@
'use strict'
class NoTimestamp {
register (Model) {
Object.defineProperties(Model, {
createdAtColumn: {
get: () => null,
},
updatedAtColumn: {
get: () => null,
},
})
}
}
module.exports = NoTimestamp

View File

@ -10,7 +10,7 @@ module.exports = {
| Application Name | Application Name
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This value is the name of your application and can be used when you | This value is the name of your application and can used when you
| need to place the application's name in a email, view or | need to place the application's name in a email, view or
| other location. | other location.
| |
@ -35,7 +35,7 @@ module.exports = {
| Allow Method Spoofing | Allow Method Spoofing
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Method spoofing allows you to make requests by spoofing the http verb. | Method spoofing allows to make requests by spoofing the http verb.
| Which means you can make a GET request but instruct the server to | Which means you can make a GET request but instruct the server to
| treat as a POST or PUT request. If you want this feature, set the | treat as a POST or PUT request. If you want this feature, set the
| below value to true. | below value to true.
@ -48,10 +48,10 @@ module.exports = {
| Trust Proxy | Trust Proxy
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Trust proxy defines whether X-Forwarded-* headers should be trusted or not. | Trust proxy defines whether X-Forwaded-* headers should be trusted or not.
| When your application is behind a proxy server like nginx, these values | When your application is behind a proxy server like nginx, these values
| are set automatically and should be trusted. Apart from setting it | are set automatically and should be trusted. Apart from setting it
| to true or false Adonis supports a handful of ways to allow proxy | to true or false Adonis supports handful or ways to allow proxy
| values. Read documentation for that. | values. Read documentation for that.
| |
*/ */
@ -88,7 +88,7 @@ module.exports = {
| Etag | Etag
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Set etag on all HTTP responses. In order to disable for selected routes, | Set etag on all HTTP response. In order to disable for selected routes,
| you can call the `response.send` with an options object as follows. | you can call the `response.send` with an options object as follows.
| |
| response.send('Hello', { ignoreEtag: true }) | response.send('Hello', { ignoreEtag: true })
@ -116,9 +116,9 @@ module.exports = {
| Dot Files | Dot Files
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Define how to treat dot files when trying to serve static resources. | Define how to treat dot files when trying to server static resources.
| By default it is set to ignore, which will pretend that dotfiles | By default it is set to ignore, which will pretend that dotfiles
| do not exist. | does not exists.
| |
| Can be one of the following | Can be one of the following
| ignore, deny, allow | ignore, deny, allow

View File

@ -91,11 +91,5 @@ module.exports = {
| the redis file. But you are free to define an object here too. | the redis file. But you are free to define an object here too.
| |
*/ */
redis: { redis: 'self::redis.local'
host: '127.0.0.1',
port: 6379,
password: null,
db: 0,
keyPrefix: ''
}
} }

View File

@ -18,7 +18,7 @@
"dependencies": { "dependencies": {
"@adonisjs/ace": "^5.0.8", "@adonisjs/ace": "^5.0.8",
"@adonisjs/auth": "^3.0.7", "@adonisjs/auth": "^3.0.7",
"@adonisjs/bodyparser": "~2.0.9", "@adonisjs/bodyparser": "^2.0.5",
"@adonisjs/cors": "^1.0.7", "@adonisjs/cors": "^1.0.7",
"@adonisjs/fold": "^4.0.9", "@adonisjs/fold": "^4.0.9",
"@adonisjs/framework": "^5.0.9", "@adonisjs/framework": "^5.0.9",

View File

@ -67,16 +67,6 @@ section:before {
animation: slideUp 1s cubic-bezier(0.19, 1, 0.30, 1) 0.5s forwards; animation: slideUp 1s cubic-bezier(0.19, 1, 0.30, 1) 0.5s forwards;
} }
a {
color: inherit;
text-decoration: underline;
}
p {
margin: 0.83rem 0;
}
@keyframes slideUp { @keyframes slideUp {
0% { 0% {
transform: translateY(40px); transform: translateY(40px);

View File

@ -9,12 +9,7 @@
<section> <section>
<div class="logo"></div> <div class="logo"></div>
<div class="title"></div> <div class="title"></div>
<div class="subtitle"> <div class="subtitle"><p>AdonisJs simplicity will make you feel confident about your code</p></div>
<p>AdonisJs simplicity will make you feel confident about your code</p>
<p>
Don't know where to start? Read the <a href="https://adonisjs.com/docs">documentation</a>.
</p>
</div>
</section> </section>
</body> </body>
</html> </html>

View File

@ -16,8 +16,7 @@ const globalMiddleware = [
'Adonis/Middleware/BodyParser', 'Adonis/Middleware/BodyParser',
'Adonis/Middleware/Session', 'Adonis/Middleware/Session',
'Adonis/Middleware/Shield', 'Adonis/Middleware/Shield',
'Adonis/Middleware/AuthInit', 'Adonis/Middleware/AuthInit'
'App/Middleware/ConvertEmptyStringsToNull',
] ]
/* /*
@ -38,8 +37,7 @@ const globalMiddleware = [
| |
*/ */
const namedMiddleware = { const namedMiddleware = {
auth: 'Adonis/Middleware/Auth', auth: 'Adonis/Middleware/Auth'
guest: 'Adonis/Middleware/AllowGuestOnly'
} }
/* /*

View File

@ -13,7 +13,7 @@
| |
*/ */
/** @type {typeof import('@adonisjs/framework/src/Route/Manager')} */ /** @type {typeof import('@adonisjs/framework/src/Route/Manager'} */
const Route = use('Route') const Route = use('Route')
Route.on('/').render('welcome') Route.on('/').render('welcome')