import axios from 'axios' ; import { ENDPOINT , errorHandler } from './base' ; type Announcement = { version : string ; title : string ; content : string ; } ; export class SettingsService { static async getRange ( ) { const res = await axios . get ( `${ ENDPOINT }/settings/quality-range` ) . catch ( errorHandler ) ; return res ?. data . data ?? [ ] ; } static async getAnnouncement ( ) { const res = await axios . get ( `${ ENDPOINT }/settings/announcement` ) . catch ( ( ) => null ) ; return res ?. data . data ?. [ 0 ] ?? { } ; } }