19 lines
382 B
TypeScript
19 lines
382 B
TypeScript
import type { IGiteaSecret } from './gitea.interfaces.js';
|
|
|
|
export class GiteaSecret {
|
|
public readonly name: string;
|
|
public readonly createdAt: string;
|
|
|
|
constructor(raw: IGiteaSecret) {
|
|
this.name = raw.name || '';
|
|
this.createdAt = raw.created_at || '';
|
|
}
|
|
|
|
toJSON(): IGiteaSecret {
|
|
return {
|
|
name: this.name,
|
|
created_at: this.createdAt,
|
|
};
|
|
}
|
|
}
|