mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-13 19:30:30 +00:00
17 lines
373 B
TypeScript
17 lines
373 B
TypeScript
import { Transformer } from '@/modules/Transformer/Transformer';
|
|
|
|
export class GetApiKeysTransformer extends Transformer {
|
|
|
|
public includeAttributes = (): string[] => {
|
|
return ['token'];
|
|
};
|
|
|
|
public excludeAttributes = (): string[] => {
|
|
return ['tenantId'];
|
|
};
|
|
|
|
public token(apiKey) {
|
|
return apiKey.key ? `${apiKey.key.substring(0, 8)}...` : '';
|
|
}
|
|
}
|