Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Oct 23, 2024
1 parent 1fedf8e commit 64e5799
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/published-data/published-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@ export class PublishedDataService {
createPublishedDataDto: CreatePublishedDataDto,
): Promise<PublishedData> {
const username = (this.request.user as JWTUser).username;
const addedCreatedBy = addCreatedByFields<CreatePublishedDataDto>(
createPublishedDataDto,
username,
const createdPublished = new this.publishedDataModel(
addCreatedByFields<CreatePublishedDataDto>(
createPublishedDataDto,
username,
),
);
const createdPublished = new this.publishedDataModel({
...addedCreatedBy,
status: "pending_registration",
});

return createdPublished.save();
}

Expand Down
2 changes: 1 addition & 1 deletion src/published-data/schemas/published-data.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class PublishedData {
description:
"Indication of position in publication workflow e.g. doiRegistered",
})
@Prop({ type: String, required: false })
@Prop({ type: String, required: false, default: "pending_registration" })
status: string;

@ApiProperty({
Expand Down

0 comments on commit 64e5799

Please sign in to comment.