Skip to content

Commit c7ec1cc

Browse files
committed
chore: cleanup
1 parent 95aad9a commit c7ec1cc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/cores/api/api-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ export class APIService implements APIServiceClient {
351351
const load = { method, endpoint, param, body, context };
352352
return this.target
353353
.doProxy(method, host, path, param, body, context, hash)
354-
.then((data: any) => ({ index, load, data, error: null }))
355-
.catch((error: any) => ({ index, load, data: null, error }))
354+
.then((data: any) => ({ index, load, data, error: null as any }))
355+
.catch((error: any) => ({ index, load, data: null as any, error }))
356356
.then(({ index, load, data, error }) => {
357357
const baseDir = (() => {
358358
// eslint-disable-next-line prettier/prettier
@@ -402,8 +402,8 @@ export class APIService implements APIServiceClient {
402402
throw new Error(`@method is not valid. method:${method}`);
403403
};
404404
return call(method)
405-
.then((data: any) => ({ index, load, data, error: null }))
406-
.catch((error: any) => ({ index, load, data: null, error }))
405+
.then((data: any) => ({ index, load, data, error: null as any }))
406+
.catch((error: any) => ({ index, load, data: null as any, error }))
407407
.then(({ index, load, data, error }) => {
408408
const baseDir = (() => {
409409
// eslint-disable-next-line prettier/prettier

src/extended/abstract-service.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,8 @@ export abstract class AbstractProxy<U extends string, T extends CoreService<Core
654654

655655
/**
656656
* featch identity-acess from `lemon-accounts-api`
657+
*
658+
* @deprecated useless anymore since 3.2.10
657659
*/
658660
protected async fetchIdentityAccess(identityId: string, domain?: string) {
659661
domain = $T.S(domain, this.context.domain);
@@ -673,6 +675,8 @@ export abstract class AbstractProxy<U extends string, T extends CoreService<Core
673675

674676
/**
675677
* the cached identity model
678+
*
679+
* @deprecated useless anymore since 3.2.10
676680
*/
677681
protected _identity: { [key: string]: NextIdentityAccess } = {};
678682

@@ -682,6 +686,8 @@ export abstract class AbstractProxy<U extends string, T extends CoreService<Core
682686
* @param identityId id to find
683687
* @param force (optional) force to reload if not available
684688
* @returns the cached identity-access
689+
*
690+
* @deprecated useless anymore since 3.2.10
685691
*/
686692
public async getIdentity$(identityId: string, force?: boolean): Promise<NextIdentityAccess> {
687693
if (!identityId) return null;
@@ -705,6 +711,8 @@ export abstract class AbstractProxy<U extends string, T extends CoreService<Core
705711

706712
/**
707713
* get the current identity object (or throw access-error)
714+
*
715+
* @deprecated useless anymore since 3.2.10
708716
*/
709717
public async getCurrentIdentity$(throwable = true): Promise<NextIdentityAccess> {
710718
const identityId = await this.getCurrentIdentityId(throwable);

0 commit comments

Comments
 (0)