itlab-internal-services 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,16 +18,19 @@ let RSSInterceptor = class RSSInterceptor {
18
18
  this.options = options;
19
19
  }
20
20
  intercept(ctx, next) {
21
+ const request = ctx.switchToHttp().getRequest();
21
22
  const response = ctx.switchToHttp().getResponse();
22
23
  response.set('Content-Type', 'application/rss+xml');
24
+ const link = `${request.protocol}://${request.get('host')}${request.originalUrl}`;
23
25
  const feed = new feed_1.Feed({
24
26
  title: this.options.title,
25
27
  description: this.options.description,
26
28
  id: this.options.link,
27
- link: this.options.link,
28
29
  copyright: `All rights reserved ${new Date().getFullYear()}, SV Informatik GmbH`,
29
30
  generator: 'Feed for ' + this.options.title,
30
31
  updated: new Date(0),
32
+ link,
33
+ favicon: this.options.favicon,
31
34
  });
32
35
  return next.handle().pipe((0, rxjs_1.map)((entries) => {
33
36
  entries.forEach(({ title, url, content, date, categories, author }) => {
@@ -37,9 +40,9 @@ let RSSInterceptor = class RSSInterceptor {
37
40
  title: title,
38
41
  id: url,
39
42
  link: url,
40
- content: content,
43
+ content,
41
44
  date: date,
42
- category: categories ? categories.map((name) => ({ name })) : undefined,
45
+ category: categories ? categories.map((term) => ({ term })) : undefined,
43
46
  author: [author ? { name: author } : this.options.author],
44
47
  });
45
48
  });
@@ -6,4 +6,5 @@ export interface RSSOptions {
6
6
  name: string;
7
7
  email: string;
8
8
  };
9
+ favicon?: string;
9
10
  }
@@ -1,17 +1,17 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ import { ContentRichtext } from 'itlab-functions';
2
3
  import { Targets } from '../pipes/target.pipe';
3
4
  export declare class Comment {
4
5
  authorId: string;
5
6
  timestamp: number;
6
- html: string;
7
- text: string;
7
+ richtext: string;
8
8
  }
9
9
  export declare class CommentService {
10
10
  protected readonly instance: AxiosInstance;
11
11
  protected readonly target: Targets;
12
12
  constructor(instance?: AxiosInstance, target?: Targets);
13
13
  protected prefix: string;
14
- post(targetId: string, authorId: string, comment: Comment): Promise<Comment>;
14
+ post(targetId: string, authorId: string, comment: ContentRichtext): Promise<Comment>;
15
15
  delete(targetId: string): Promise<void>;
16
16
  get(targetId: string): Promise<Comment[]>;
17
17
  }
@@ -43,11 +43,7 @@ __decorate([
43
43
  __decorate([
44
44
  (0, swagger_1.ApiProperty)(),
45
45
  __metadata("design:type", String)
46
- ], Comment.prototype, "html", void 0);
47
- __decorate([
48
- (0, swagger_1.ApiProperty)({ maxLength: 50 }),
49
- __metadata("design:type", String)
50
- ], Comment.prototype, "text", void 0);
46
+ ], Comment.prototype, "richtext", void 0);
51
47
  exports.Comment = Comment;
52
48
  let CommentService = class CommentService {
53
49
  constructor(instance = axios_1.default, target = target_pipe_1.Targets.UNKNOWN) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "timo.scheuermann@sv-informatik.de",
6
6
  "url": "https://timos.design"
7
7
  },
8
- "version": "1.4.2",
8
+ "version": "1.4.4",
9
9
  "type": "commonjs",
10
10
  "files": [
11
11
  "dist"