mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
13 lines
428 B
TypeScript
13 lines
428 B
TypeScript
|
import { GitHubRelease, IServerInfoRepository } from '@app/domain';
|
||
|
import { Injectable } from '@nestjs/common';
|
||
|
import axios from 'axios';
|
||
|
|
||
|
@Injectable()
|
||
|
export class ServerInfoRepository implements IServerInfoRepository {
|
||
|
getGitHubRelease(): Promise<GitHubRelease> {
|
||
|
return axios
|
||
|
.get<GitHubRelease>('https://api.github.com/repos/immich-app/immich/releases/latest')
|
||
|
.then((response) => response.data);
|
||
|
}
|
||
|
}
|