Skip to content

Commit

Permalink
change headerImg to header_img (more consistent)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 7, 2024
1 parent f5cc708 commit b7d769a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/v2/controller/post.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export class PostController extends Controller {
@Get("{id}/header")
@SuccessResponse(302, "Redirect")
public async getHeaderForPost(@Path() id: number, @Request() request: ExRequest): Promise<void> {
const { headerImg } = await this.service.getById(id);
if (!headerImg) throw new NotFoundError("Post header image not found");
const { header_img } = await this.service.getById(id);
if (!header_img) throw new NotFoundError("Post header image not found");

request.res.redirect(302, headerImg);
request.res.redirect(302, header_img);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/v2/interfaces/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface CreateWebsitePost {
title: string; // Post main title
permalink: string; // link to the post
date: string; // date with format MM-DD-YYY
headerImg?: string; // header image url
header_img?: string; // header image url
description: string; // post HTML content
published: boolean;
downloads?: WebsitePostDownloadRecord; // possible downloads attached
Expand Down

0 comments on commit b7d769a

Please sign in to comment.