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) {
+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>
+1
View File
@@ -9,3 +9,4 @@ 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";