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, name = it.nameWithoutExtension,
url = it.toURI().toURL() url = it.toURI().toURL()
) )
} ?: return@mapNotNull null }
if (books.isNullOrEmpty()) return@mapNotNull null
Serie( Serie(
name = dir.name, name = dir.name,
url = dir.toURI().toURL(), url = dir.toURI().toURL(),

View file

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