mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Add domain permission drafts and excludes (#3547)
* [feature] Add domain permission drafts and excludes * fix typescript complaining * lint * make filenames more consistent * test own domain excluded
This commit is contained in:
@ -24,7 +24,7 @@ import {
|
||||
type DomainPerm,
|
||||
type ImportDomainPermsParams,
|
||||
type MappedDomainPerms,
|
||||
isDomainPermInternalKey,
|
||||
stripOnImport,
|
||||
} from "../../../types/domain-permission";
|
||||
import { listToKeyedObject } from "../../transforms";
|
||||
|
||||
@ -83,7 +83,7 @@ function importEntriesProcessor(formData: ImportDomainPermsParams): (_entry: Dom
|
||||
// Unset all internal processing keys
|
||||
// and any undefined keys on this entry.
|
||||
Object.entries(entry).forEach(([key, val]: [keyof DomainPerm, any]) => {
|
||||
if (val == undefined || isDomainPermInternalKey(key)) {
|
||||
if (val == undefined || stripOnImport(key)) {
|
||||
delete entry[key];
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user