File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import * as Migrations from './Migrations';
1010
1111export class DefinedSchemas {
1212 config : ParseServerOptions ;
13- migrationOptions : Migrations . MigrationsOptions ;
13+ migrationsOptions : Migrations . MigrationsOptions ;
1414 localSchemas: Migrations . JSONSchema [ ] ;
1515 retries: number ;
1616 maxRetries: number ;
Original file line number Diff line number Diff line change @@ -90,28 +90,12 @@ export class CLPHelper {
9090}
9191
9292export function makeSchema ( className : ClassNameType , schema : JSONSchema ) : JSONSchema {
93+ // This function solve two things:
94+ // 1. It provide auto-completion to the users who are implementing schemas
95+ // 2. It allow forward-compatible point in order to allow future changes to the internal structure of JSONSchema without affecting all the users
96+
9397 return {
9498 className,
95- fields : {
96- ...schema . fields ,
97- } ,
98- indexes : {
99- ...schema . indexes ,
100- } ,
101- classLevelPermissions : {
102- find : { } ,
103- count : { } ,
104- get : { } ,
105- update : { } ,
106- create : { } ,
107- delete : { } ,
108- addField : { } ,
109- protectedFields : {
110- // '*': [
111- // 'symbol',
112- // ],
113- } ,
114- ...schema . classLevelPermissions ,
115- } ,
99+ ...schema ,
116100 } ;
117101}
You can’t perform that action at this time.
0 commit comments