Revize 15c88dc1
Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)
Backend/Core/Services/TagService/TagServiceEF.cs | ||
---|---|---|
129 | 129 |
|
130 | 130 |
if (request.DisabledForAnnotators != null) |
131 | 131 |
{ |
132 |
category.DisabledForAnnotators = (bool) request.DisabledForAnnotators;
|
|
132 |
category.DisabledForAnnotators = (bool)request.DisabledForAnnotators; |
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
databaseContext.SaveChanges(); |
... | ... | |
149 | 149 |
var category = databaseContext.TagCategories.First(tc => tc.Id == request.CategoryId); |
150 | 150 |
|
151 | 151 |
databaseContext.Tags.Add(new Entities.Tag() |
152 |
databaseContext.Tags.Add(new Tag() |
|
152 | 153 |
{ |
153 | 154 |
Name = request.Name, |
154 | 155 |
Color = request.Color, |
155 | 156 |
Description = request.Description, |
156 |
Category = category |
|
157 |
Category = category, |
|
158 |
SentimentEnabled = request.SentimentEnabled |
|
157 | 159 |
}); |
158 | 160 |
|
159 | 161 |
databaseContext.SaveChanges(); |
... | ... | |
192 | 194 |
tag.Description = request.Description; |
193 | 195 |
} |
194 | 196 |
|
197 |
if (request.SentimentEnabled != null) |
|
198 |
{ |
|
199 |
tag.SentimentEnabled = (bool)request.SentimentEnabled; |
|
200 |
} |
|
201 |
|
|
195 | 202 |
databaseContext.SaveChanges(); |
196 | 203 |
} |
197 | 204 |
|
... | ... | |
211 | 218 |
{ |
212 | 219 |
Name = request.Name, |
213 | 220 |
Description = request.Description, |
214 |
Tag = tag |
|
221 |
Tag = tag, |
|
222 |
SentimentEnabled = request.SentimentEnabled |
|
215 | 223 |
}); |
216 | 224 |
|
217 | 225 |
databaseContext.SaveChanges(); |
... | ... | |
241 | 249 |
subtag.Description = request.Description; |
242 | 250 |
} |
243 | 251 |
|
252 |
if (request.SentimentEnabled != null) |
|
253 |
{ |
|
254 |
subtag.SentimentEnabled = (bool) request.SentimentEnabled; |
|
255 |
} |
|
256 |
|
|
244 | 257 |
databaseContext.SaveChanges(); |
245 | 258 |
} |
246 | 259 |
|
Také k dispozici: Unified diff
Added sentiment to Tags and SubTags, modified create/update tag/subtag endpoints, added set instance sentiment endpoint