Fixed login and error handling

This commit is contained in:
Anton Stubenbord
2022-12-30 01:28:43 +01:00
parent bf0e186646
commit 2326c9d1d6
43 changed files with 502 additions and 447 deletions

View File

@@ -58,10 +58,6 @@ class DocumentUploadCubit extends Cubit<DocumentUploadState> {
Iterable<int> tags = const [],
DateTime? createdAt,
}) async {
final auth = await _localVault.loadAuthenticationInformation();
if (auth == null || !auth.isValid) {
throw const PaperlessServerException(ErrorCode.notAuthenticated);
}
await _documentApi.create(
bytes,
filename: filename,