chore(FEEDBACK-0001): linting
This commit is contained in:
@@ -40,12 +40,7 @@ export class VersionService {
|
||||
* @throws NotFoundError when the parent repository does not exist
|
||||
* @throws AlreadyExistsError when the tag is already registered
|
||||
*/
|
||||
add(
|
||||
repositoryId: string,
|
||||
tag: string,
|
||||
title?: string,
|
||||
commitHash?: string
|
||||
): RepositoryVersion {
|
||||
add(repositoryId: string, tag: string, title?: string, commitHash?: string): RepositoryVersion {
|
||||
// Verify parent repository exists.
|
||||
const repo = this.db
|
||||
.prepare(`SELECT id, source, source_url FROM repositories WHERE id = ?`)
|
||||
@@ -115,9 +110,7 @@ export class VersionService {
|
||||
*/
|
||||
getByTag(repositoryId: string, tag: string): RepositoryVersion | null {
|
||||
const row = this.db
|
||||
.prepare(
|
||||
`SELECT * FROM repository_versions WHERE repository_id = ? AND tag = ?`
|
||||
)
|
||||
.prepare(`SELECT * FROM repository_versions WHERE repository_id = ? AND tag = ?`)
|
||||
.get(repositoryId, tag) as RepositoryVersionEntity | undefined;
|
||||
return row ? RepositoryVersionMapper.fromEntity(new RepositoryVersionEntity(row)) : null;
|
||||
}
|
||||
@@ -137,9 +130,9 @@ export class VersionService {
|
||||
previousVersions: { tag: string; title: string; commitHash?: string }[]
|
||||
): RepositoryVersion[] {
|
||||
// Verify parent repository exists.
|
||||
const repo = this.db
|
||||
.prepare(`SELECT id FROM repositories WHERE id = ?`)
|
||||
.get(repositoryId) as { id: string } | undefined;
|
||||
const repo = this.db.prepare(`SELECT id FROM repositories WHERE id = ?`).get(repositoryId) as
|
||||
| { id: string }
|
||||
| undefined;
|
||||
|
||||
if (!repo) {
|
||||
throw new NotFoundError(`Repository ${repositoryId} not found`);
|
||||
|
||||
Reference in New Issue
Block a user