Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(templates): correct import & nullable field #209

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/config/auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* file.
*/

import { AuthConfig } from '@ioc:Adonis/Addons/Auth'
import type { AuthConfig } from '@ioc:Adonis/Addons/Auth'

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions templates/middleware/Auth.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GuardsList } from '@ioc:Adonis/Addons/Auth'
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import { AuthenticationException } from '@adonisjs/auth/build/standalone'
import type { GuardsList } from '@ioc:Adonis/Addons/Auth'
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'

/**
* Auth middleware is meant to restrict un-authenticated access to a given route
Expand Down
2 changes: 1 addition & 1 deletion templates/middleware/SilentAuth.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/migrations/api_tokens.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'

export default class {{ tokensSchemaName }} extends BaseSchema {
export default class extends BaseSchema {
protected tableName = '{{ tokensTableName }}'

public async up() {
Expand Down
2 changes: 1 addition & 1 deletion templates/migrations/auth.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'

export default class {{ usersSchemaName }} extends BaseSchema {
export default class extends BaseSchema {
protected tableName = '{{ usersTableName }}'

public async up() {
Expand Down
2 changes: 1 addition & 1 deletion templates/model.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class {{ modelName }} extends BaseModel {
public password: string

@column()
public rememberMeToken?: string
public rememberMeToken: string | null

@column.dateTime({ autoCreate: true })
public createdAt: DateTime
Expand Down