@meridianjs/issue 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -166,11 +166,11 @@ var IssueModuleService = class extends (0, import_framework_utils6.MeridianServi
|
|
|
166
166
|
if (!project) {
|
|
167
167
|
throw Object.assign(new Error(`Project ${input.project_id} not found`), { status: 404 });
|
|
168
168
|
}
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
0
|
|
169
|
+
const [highest] = await issueRepo.find(
|
|
170
|
+
{ project_id: input.project_id },
|
|
171
|
+
{ orderBy: { number: "DESC" }, limit: 1 }
|
|
173
172
|
);
|
|
173
|
+
const maxNumber = highest?.number ?? 0;
|
|
174
174
|
const nextNumber = maxNumber + 1;
|
|
175
175
|
const identifier = `${project.identifier}-${nextNumber}`;
|
|
176
176
|
const issue = issueRepo.create({
|
package/dist/index.mjs
CHANGED
|
@@ -140,11 +140,11 @@ var IssueModuleService = class extends MeridianService({
|
|
|
140
140
|
if (!project) {
|
|
141
141
|
throw Object.assign(new Error(`Project ${input.project_id} not found`), { status: 404 });
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
0
|
|
143
|
+
const [highest] = await issueRepo.find(
|
|
144
|
+
{ project_id: input.project_id },
|
|
145
|
+
{ orderBy: { number: "DESC" }, limit: 1 }
|
|
147
146
|
);
|
|
147
|
+
const maxNumber = highest?.number ?? 0;
|
|
148
148
|
const nextNumber = maxNumber + 1;
|
|
149
149
|
const identifier = `${project.identifier}-${nextNumber}`;
|
|
150
150
|
const issue = issueRepo.create({
|