Browse Source

changed tags from array to string

pull/1/head
Senta Mandutz 5 years ago
parent
commit
e278cbf6ec
2 changed files with 7 additions and 7 deletions
  1. 1
    1
      message.model.js
  2. 6
    6
      public/createMessage.js

+ 1
- 1
message.model.js View File

@@ -14,7 +14,7 @@ const MessageSchema = mongoose.Schema({
subject: { type: String, required: true },
message: { type: String, required: true },
user: { type: String, required: true },
tag: {type: [String] },
tag: {type: String },
});

module.exports = mongoose.model('Message', MessageSchema);

+ 6
- 6
public/createMessage.js View File

@@ -3,8 +3,12 @@ const CreateMsgRouter = {
<div class="card om-card">
<h4>Neue Nachricht erstellen</h4>
<form class="new-msg-form" @submit.prevent=createMsg>
<div class="form-group">
<label class="bmd-label-floating">User*</label>
<input type="text" class="form-control" id="user">
</div>
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Betreff</label>
<label class="bmd-label-floating">Betreff*</label>
<input type="text" class="form-control" id="subject">
</div>
<div class="form-group bmd-form-group">
@@ -12,13 +16,9 @@ const CreateMsgRouter = {
<input type="text" class="form-control" id="tag">
</div>
<div class="form-group">
<label class="bmd-label-floating">Nachricht</label>
<label class="bmd-label-floating">Nachricht*</label>
<textarea class="form-control" id="message" rows="5"></textarea>
</div>
<div class="form-group">
<label class="bmd-label-floating">User</label>
<input type="text" class="form-control" id="user">
</div>
<button class="btn btn-default"><a @click="$router.go(-1)">ABBRECHEN </a></button>
<button type="submit" class="btn btn-raised om-btn"><a @click="$router.push('/home')">SENDEN</a></button>
</form>

Loading…
Cancel
Save