Skip to content

Commit

Permalink
Merge pull request #167 from Chia-Network/fix-duplicated-identifiers
Browse files Browse the repository at this point in the history
fix: duplicated definitions
  • Loading branch information
TheLastCicada authored Jan 8, 2025
2 parents 9e7b243 + 936ff0a commit 1e8c74f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/models/address-book/address-book.mock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import stub from './address-book.stub.js';

export const StatisticsMock = {
export const AddressBookMock = {
findAll: () => stub,
};
6 changes: 3 additions & 3 deletions src/validations/address-book-validations.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Joi from 'joi';
import { genericSortColumnRegex } from '../utils/string-utils';

export const baseSchema = {
export const addressBookBaseSchema = {
name: Joi.string().required(),
walletAddress: Joi.string().required(),
};
Expand All @@ -17,12 +17,12 @@ export const addressBookGetQuerySchema = Joi.object()
.with('limit', 'page');

export const addressBookPostSchema = Joi.object({
...baseSchema,
...addressBookBaseSchema,
});

export const addressBookUpdateSchema = Joi.object({
id: Joi.string().required(),
...baseSchema,
...addressBookBaseSchema,
});

export const addressBookDeleteSchema = Joi.object({
Expand Down
12 changes: 6 additions & 6 deletions src/validations/projects.validations.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Joi from 'joi';
import {
cobenefitSchema,
estimationSchema,
issuanceSchema,
labelSchema,
locationSchema,
ratingSchema,
relatedProjectSchema,
labelSchema,
issuanceSchema,
estimationSchema,
} from '../validations';

import {
Expand All @@ -16,7 +16,7 @@ import {

import { pickListValidation } from '../utils/validation-utils';

export const baseSchema = {
export const projectsBaseSchema = {
// warehouseProjectId - derived upon creation
// orgUid - derived upon creation
currentRegistry: Joi.string().allow(null).optional(),
Expand Down Expand Up @@ -84,12 +84,12 @@ export const projectsGetQuerySchema = Joi.object()
.with('limit', 'page');

export const projectsPostSchema = Joi.object({
...baseSchema,
...projectsBaseSchema,
});

export const projectsUpdateSchema = Joi.object({
warehouseProjectId: Joi.string().required(),
...baseSchema,
...projectsBaseSchema,
});

export const projectsDeleteSchema = Joi.object({
Expand Down

0 comments on commit 1e8c74f

Please sign in to comment.