mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
minor
This commit is contained in:
parent
a2ffcfe8f1
commit
4d39fc41c5
2 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@ export default {
|
|||
async asyncData ({ $axios, params, error }) {
|
||||
try {
|
||||
const tag = params.tag
|
||||
const events = await $axios.$get(`/events?tags=${tag}`)
|
||||
const events = await $axios.$get(`/tag/${tag}`)
|
||||
return { events, tag }
|
||||
} catch (e) {
|
||||
error({ statusCode: 400, message: 'Error!' })
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { Model, DataTypes } = require('sequelize')
|
||||
const Cohort = require('./cohort')
|
||||
const Collection = require('./collection')
|
||||
const sequelize = require('./index').sequelize
|
||||
|
||||
class Filter extends Model {}
|
||||
|
@ -18,7 +18,7 @@ Filter.init({
|
|||
}
|
||||
}, { sequelize, modelName: 'filter', timestamps: false })
|
||||
|
||||
Filter.belongsTo(Cohort)
|
||||
Cohort.hasMany(Filter)
|
||||
Filter.belongsTo(Collection)
|
||||
Collection.hasMany(Filter)
|
||||
|
||||
module.exports = Filter
|
||||
|
|
Loading…
Reference in a new issue