<commit_before>package api

import (
	"errors"
	"time"

	"gopkg.in/macaron.v1"

	"github.com/emersion/neutron/backend"
)

func getLabelID(name string) (label string) {
	switch name {
	case "trash":
		label = backend.TrashLabel
	case "inbox":
		label = backend.InboxLabel
	case "spam":
		label = backend.SpamLabel
	case "archive":
		label = backend.ArchiveLabel
	}
	return
}

type MessageReq struct {
	Req
	Message *backend.Message
	ID string `json:"id"`
	ParentID string
}<commit_msg>Adds missing draft label in api endpoint<commit_after>package api

import (
	"errors"
	"time"

	"gopkg.in/macaron.v1"

	"github.com/emersion/neutron/backend"
)

func getLabelID(name string) (label string) {
	switch name {
	case "draft":
		label = backend.DraftLabel
	case "trash":
		label = backend.TrashLabel
	case "inbox":
		label = backend.InboxLabel
	case "spam":
		label = backend.SpamLabel
	case "archive":
		label = backend.ArchiveLabel
	}
	return
}

type MessageReq struct {
	Req
	Message *backend.Message
	ID string `json:"id"`
	ParentID string
}
{'fraction_non_alphanumeric': 0.11453320500481232, 'fraction_numerical': 0.0019249278152069298, 'mean_word_length': 4.148514851485149, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '774653', 'n_tokens_mistral': 396, 'n_tokens_neox': 379, 'n_words': 94}