generated from nhcarrigan/template
feat: implement user profiles with achievements and primary badge system #58
@@ -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) {
|
||||||
|
|||||||
@@ -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");
|
||||||
|
};
|
||||||
|
|||||||
@@ -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) => { ... })
|
||||||
|
*/
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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';
|
||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user