mirror of
https://github.com/ragestudio/comty.js.git
synced 2025-06-08 18:14:18 +00:00
added events model
This commit is contained in:
parent
9002716421
commit
c0b93aa9fd
21
src/models/events/index.js
Normal file
21
src/models/events/index.js
Normal file
@ -0,0 +1,21 @@
|
||||
import request from "../../request"
|
||||
|
||||
export default class EventsModel {
|
||||
static async getFeatured() {
|
||||
const { data } = await request({
|
||||
method: "GET",
|
||||
url: "/featured/events",
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
static async data(id) {
|
||||
const { data } = await request({
|
||||
method: "GET",
|
||||
url: `/events/${id}/data`,
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user