Beispiel #1
0
        public (bool created, int reportId) CreateReport(int tagId, TagReportType reportType, string hostname, string notes, int?versionNumber)
        {
            ParamIs.NotNull(() => hostname);
            ParamIs.NotNull(() => notes);

            return(HandleTransaction(ctx => {
                return new Model.Service.Queries.EntryReportQueries().CreateReport(ctx, PermissionContext,
                                                                                   entryLinkFactory,
                                                                                   (song, reporter, notesTruncated) => new TagReport(song, reportType, reporter, hostname, notesTruncated, versionNumber),
                                                                                   () => reportType != TagReportType.Other ? enumTranslations.Translation(reportType) : null,
                                                                                   tagId, reportType, hostname, notes);
            }));
        }
Beispiel #2
0
 public void PostReport(int tagId, TagReportType reportType, string notes, int?versionNumber) => _queries.CreateReport(tagId, reportType, WebHelper.GetRealHost(Request), notes ?? string.Empty, versionNumber);