chore: add missing pieces for profile reporting and fix formatting

- Added Reports link to admin dropdown menu
- Fixed log route path (changed from '/log' to '/')
- Exported report types from shared-types index
- Fixed whitespace alignment in auth and game types
- Fixed formatting in e2e test files (newlines, comment style)
This commit is contained in:
2026-02-19 18:38:16 -08:00
committed by Naomi Carrigan
parent d797d38ddd
commit 8f569e0bb4
10 changed files with 56 additions and 42 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ interface LogBody {
} }
export default async function (fastify: FastifyInstance) { export default async function (fastify: FastifyInstance) {
fastify.post('/log', async function (request: FastifyRequest<{ Body: LogBody }>) { fastify.post('/', async function (request: FastifyRequest<{ Body: LogBody }>) {
const { level, message, context, error } = request.body; const { level, message, context, error } = request.body;
if (level === 'error' && error) { if (level === 'error' && error) {
+1 -1
View File
@@ -18,4 +18,4 @@ describe("frontend-e2e", () => {
// Function helper example, see `../support/app.po.ts` file // Function helper example, see `../support/app.po.ts` file
getGreeting().contains(/Welcome/); getGreeting().contains(/Welcome/);
}); });
}); });
+6 -1
View File
@@ -4,4 +4,9 @@
* @license Naomi's Public License * @license Naomi's Public License
*/ */
export const getGreeting = (): Cypress.Chainable => cy.get("h1"); /**
*
*/
export const getGreeting = (): Cypress.Chainable => {
return cy.get("h1");
};
+14 -8
View File
@@ -13,14 +13,14 @@
* *
* For more comprehensive examples of custom * For more comprehensive examples of custom
* commands please read more here: * commands please read more here:
* https://on.cypress.io/custom-commands * https://on.cypress.io/custom-commands.
*/ */
// eslint-disable-next-line @typescript-eslint/no-namespace -- Required for Cypress type extensions // eslint-disable-next-line @typescript-eslint/no-namespace -- Required for Cypress type extensions
declare namespace Cypress { declare namespace Cypress {
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- Subject is required for type definition // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Subject is required for type definition
interface Chainable<Subject> { interface Chainable<Subject> {
login: (email: string, password: string) => void; login: (email: string, password: string)=> void;
} }
} }
@@ -30,11 +30,17 @@ Cypress.Commands.add("login", (email, password) => {
console.log("Custom command example: Login", email, password); console.log("Custom command example: Login", email, password);
}); });
// -- This is a child command -- /*
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) * -- This is a child command --
* Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
*/
// -- This is a dual command -- /*
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) * -- This is a dual command --
* Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
*/
// -- This will overwrite an existing command -- /*
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) * -- This will overwrite an existing command --
* Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
*/
+1 -1
View File
@@ -16,7 +16,7 @@
* 'supportFile' configuration option. * 'supportFile' configuration option.
* *
* You can read more here: * You can read more here:
* https://on.cypress.io/configuration * https://on.cypress.io/configuration.
*/ */
// Import commands.ts using ES2015 syntax: // Import commands.ts using ES2015 syntax:
@@ -60,6 +60,7 @@ import { ApiService } from '../../services/api.service';
<a routerLink="/admin/users" class="dropdown-item" (click)="closeDropdown()">Users</a> <a routerLink="/admin/users" class="dropdown-item" (click)="closeDropdown()">Users</a>
<a routerLink="/admin/audit" class="dropdown-item" (click)="closeDropdown()">Audit</a> <a routerLink="/admin/audit" class="dropdown-item" (click)="closeDropdown()">Audit</a>
<a routerLink="/admin/suggestions" class="dropdown-item" (click)="closeDropdown()">Suggestions</a> <a routerLink="/admin/suggestions" class="dropdown-item" (click)="closeDropdown()">Suggestions</a>
<a routerLink="/admin/reports" class="dropdown-item" (click)="closeDropdown()">Reports</a>
} }
<button (click)="logout()" class="dropdown-item logout-btn">Logout</button> <button (click)="logout()" class="dropdown-item logout-btn">Logout</button>
</div> </div>
+2 -1
View File
@@ -8,4 +8,5 @@ export { ApiService } from './api.service';
export { AuthService } from './auth.service'; export { AuthService } from './auth.service';
export { BooksService } from './books.service'; export { BooksService } from './books.service';
export { GamesService } from './games.service'; export { GamesService } from './games.service';
export { MusicService } from './music.service'; export { MusicService } from './music.service';
export { ReportService } from './report.service';
+1
View File
@@ -13,5 +13,6 @@ export * from "./lib/game.types";
export type * from "./lib/like.types"; export type * from "./lib/like.types";
export * from "./lib/manga.types"; export * from "./lib/manga.types";
export * from "./lib/music.types"; export * from "./lib/music.types";
export * from "./lib/report.types";
export * from "./lib/show.types"; export * from "./lib/show.types";
export * from "./lib/suggestion.types"; export * from "./lib/suggestion.types";
+21 -21
View File
@@ -5,28 +5,28 @@
*/ */
interface User { interface User {
id: string; id: string;
email: string; email: string;
username: string; username: string;
avatar?: string; avatar?: string;
slug?: string; slug?: string;
displayName?: string; displayName?: string;
bio?: string; bio?: string;
profilePublic: boolean; profilePublic: boolean;
website?: string; website?: string;
discordServer?: string; discordServer?: string;
bluesky?: string; bluesky?: string;
github?: string; github?: string;
linkedin?: string; linkedin?: string;
twitch?: string; twitch?: string;
youtube?: string; youtube?: string;
discordId: string; discordId: string;
isAdmin: boolean; isAdmin: boolean;
isBanned: boolean; isBanned: boolean;
inDiscord: boolean; inDiscord: boolean;
isVip: boolean; isVip: boolean;
isMod: boolean; isMod: boolean;
isStaff: boolean; isStaff: boolean;
} }
interface JwtPayload { interface JwtPayload {
+8 -8
View File
@@ -32,16 +32,16 @@ interface Game {
} }
interface CreateGameDto { interface CreateGameDto {
title: string; title: string;
platform?: string; platform?: string;
status: GameStatus; status: GameStatus;
dateStarted?: Date; dateStarted?: Date;
dateFinished?: Date; dateFinished?: Date;
rating?: number; rating?: number;
notes?: string; notes?: string;
coverImage?: string; coverImage?: string;
tags?: Array<string>; tags?: Array<string>;
links?: Array<Link>; links?: Array<Link>;
} }
interface UpdateGameDto extends Partial<CreateGameDto> { interface UpdateGameDto extends Partial<CreateGameDto> {