fix(mta): Expose HttpResponse.statusCode and add explicit generic type annotations in DNSManager cache retrieval
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/platformservice',
|
||||
version: '1.1.1',
|
||||
version: '1.1.2',
|
||||
description: 'A multifaceted platform service handling mail, SMS, letter delivery, and AI services.'
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class HttpResponse {
|
||||
private headers: Record<string, string> = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
private statusCode: number = 200;
|
||||
public statusCode: number = 200;
|
||||
|
||||
constructor(private res: any) {}
|
||||
|
||||
|
@ -71,7 +71,7 @@ export class DNSManager {
|
||||
const cacheKey = `mx:${domain}`;
|
||||
|
||||
// Check cache first
|
||||
const cached = this.getFromCache(cacheKey);
|
||||
const cached = this.getFromCache<plugins.dns.MxRecord[]>(cacheKey);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
@ -103,7 +103,7 @@ export class DNSManager {
|
||||
const cacheKey = `txt:${domain}`;
|
||||
|
||||
// Check cache first
|
||||
const cached = this.getFromCache(cacheKey);
|
||||
const cached = this.getFromCache<string[][]>(cacheKey);
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
|
Reference in New Issue
Block a user