mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fix: get highest ASN regardless of user (#4326)
This commit is contained in:
@@ -229,6 +229,14 @@ describe(`DocumentService`, () => {
|
||||
`${environment.apiBaseUrl}${endpoint}/${documents[0].id}/preview/#search="${searchQuery}"`
|
||||
)
|
||||
})
|
||||
|
||||
it('should support get next asn', () => {
|
||||
subscription = service.getNextAsn().subscribe((asn) => asn)
|
||||
const req = httpTestingController.expectOne(
|
||||
`${environment.apiBaseUrl}${endpoint}/next_asn/`
|
||||
)
|
||||
expect(req.request.method).toEqual('GET')
|
||||
})
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -143,6 +143,10 @@ export class DocumentService extends AbstractPaperlessService<PaperlessDocument>
|
||||
return url
|
||||
}
|
||||
|
||||
getNextAsn(): Observable<number> {
|
||||
return this.http.get<number>(this.getResourceUrl(null, 'next_asn'))
|
||||
}
|
||||
|
||||
update(o: PaperlessDocument): Observable<PaperlessDocument> {
|
||||
// we want to only set created_date
|
||||
o.created = undefined
|
||||
|
Reference in New Issue
Block a user