Store types
This commit is contained in:
parent
004de36144
commit
8fd76b88b6
@ -2,14 +2,14 @@
|
||||
|
||||
var ModType = {
|
||||
mod: "mod",
|
||||
modpack: "modpack",
|
||||
game: "game"
|
||||
game: "game",
|
||||
texturepack: "texturepack"
|
||||
}
|
||||
|
||||
class Mod {
|
||||
constructor(author) {
|
||||
this.author = author || null
|
||||
this.type = "1"
|
||||
this.type = null
|
||||
this.basename = null
|
||||
this.title = null
|
||||
this.description = ""
|
||||
|
@ -19,6 +19,7 @@ var User = sequelize.define("user", {
|
||||
|
||||
var Mod = sequelize.define("mod", {
|
||||
basename: Sequelize.STRING(100),
|
||||
type: Sequelize.ENUM("mod", "game", "texturepack"),
|
||||
|
||||
title: Sequelize.STRING(100),
|
||||
description: Sequelize.STRING(900),
|
||||
@ -41,6 +42,7 @@ const CMod = require("./../../common/mod")
|
||||
function convertRowToMod(row) {
|
||||
var mod = new CMod(row.user.username)
|
||||
mod.basename = row.basename
|
||||
mod.type = row.type
|
||||
mod.title = row.title
|
||||
mod.description = row.description
|
||||
mod.forum_id = row.forum_id
|
||||
@ -80,6 +82,7 @@ async.parallel([
|
||||
},
|
||||
defaults: {
|
||||
user: user,
|
||||
type: "mod",
|
||||
|
||||
title: "Awards",
|
||||
description: "Adds awards to minetest",
|
||||
|
Loading…
x
Reference in New Issue
Block a user