fix FileSystemScanner.kt which would return Series with no books

added test user
This commit is contained in:
Gauthier Roebroeck 2019-08-10 15:56:40 +08:00
parent 6b0d849d25
commit b16d66a7b1
2 changed files with 3 additions and 1 deletions

View file

@ -24,7 +24,8 @@ class FileSystemScanner(
name = it.nameWithoutExtension,
url = it.toURI().toURL()
)
} ?: return@mapNotNull null
}
if (books.isNullOrEmpty()) return@mapNotNull null
Serie(
name = dir.name,
url = dir.toURI().toURL(),

View file

@ -52,6 +52,7 @@ class SecurityConfiguration : WebSecurityConfigurerAdapter() {
override fun configure(auth: AuthenticationManagerBuilder) {
auth.inMemoryAuthentication()
.withUser("admin").password("{noop}admin").roles("ADMIN", "USER")
.and().withUser("user").password("{noop}user").roles("USER")
}
@Bean