-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove additional information about deleted fields
- Loading branch information
1 parent
bf598b4
commit b3901b6
Showing
5 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { APIAction } from './action' | ||
import OfflineAPI from '../offline-api/index' | ||
|
||
class ContentTypeFieldPurgeAction extends APIAction { | ||
private contentTypeId: string | ||
private fieldId: string | ||
|
||
constructor (contentTypeId: string, fieldId: string) { | ||
super() | ||
this.contentTypeId = contentTypeId | ||
this.fieldId = fieldId | ||
} | ||
|
||
async applyTo (api: OfflineAPI) { | ||
const contentType = await api.getContentType(this.contentTypeId) | ||
contentType.fields.deleteField(this.fieldId) | ||
} | ||
} | ||
|
||
export { ContentTypeFieldPurgeAction } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters