Newer
Older
export class MonthlyNewsService {
private readonly _apiUrl: string
constructor() {
this._apiUrl = 'https://localhost:1443/'
}
* Creates a quotation and header for selected month
* @param date
* @param header
* @param quote
*/
await axios.post(
`${this._apiUrl}api/admin/monthlyNews`,
month: date.getMonth(),
year: date.getFullYear(),
header: header,
quote: quote,
},
{
headers: {
'XSRF-TOKEN': token,
},
/**
* Gets a quotation and header for selected month
*/
year: number,
month: number,
token: string
const { data } = await axios.get(
`${this._apiUrl}api/admin/monthlyNews/${year}/${month}`,
headers: {
'XSRF-TOKEN': token,
},