feat: Add name column to Step model
This commit is contained in:
@@ -22,6 +22,7 @@ class Step extends Base {
|
||||
id: { type: 'string', format: 'uuid' },
|
||||
flowId: { type: 'string', format: 'uuid' },
|
||||
key: { type: ['string', 'null'] },
|
||||
name: { type: ['string', 'null'], minLength: 1, maxLength: 255 },
|
||||
appKey: { type: ['string', 'null'], minLength: 1, maxLength: 255 },
|
||||
type: { type: 'string', enum: ['action', 'trigger'] },
|
||||
connectionId: { type: ['string', 'null'], format: 'uuid' },
|
||||
@@ -314,7 +315,13 @@ class Step extends Base {
|
||||
}
|
||||
|
||||
async updateFor(user, newStepData) {
|
||||
const { appKey = this.appKey, connectionId, key, parameters } = newStepData;
|
||||
const {
|
||||
appKey = this.appKey,
|
||||
name,
|
||||
connectionId,
|
||||
key,
|
||||
parameters,
|
||||
} = newStepData;
|
||||
|
||||
if (connectionId && appKey) {
|
||||
await user.authorizedConnections
|
||||
@@ -335,6 +342,7 @@ class Step extends Base {
|
||||
|
||||
const updatedStep = await this.$query().patchAndFetch({
|
||||
key,
|
||||
name,
|
||||
appKey,
|
||||
connectionId: connectionId,
|
||||
parameters: parameters,
|
||||
|
||||
Reference in New Issue
Block a user