Add servers.lastLocalAuthenticatedSession column
This commit is contained in:
parent
f8656694bb
commit
dc59232305
|
@ -17,4 +17,6 @@ export default class Server extends Model {
|
||||||
@date('rooms_updated_at') roomsUpdatedAt;
|
@date('rooms_updated_at') roomsUpdatedAt;
|
||||||
|
|
||||||
@field('version') version;
|
@field('version') version;
|
||||||
|
|
||||||
|
@date('last_local_authenticated_session') lastLocalAuthenticatedSession;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,17 @@ export default schemaMigrations({
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
toVersion: 4,
|
||||||
|
steps: [
|
||||||
|
addColumns({
|
||||||
|
table: 'servers',
|
||||||
|
columns: [
|
||||||
|
{ name: 'last_local_authenticated_session', type: 'number', isOptional: true }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { appSchema, tableSchema } from '@nozbe/watermelondb';
|
import { appSchema, tableSchema } from '@nozbe/watermelondb';
|
||||||
|
|
||||||
export default appSchema({
|
export default appSchema({
|
||||||
version: 3,
|
version: 4,
|
||||||
tables: [
|
tables: [
|
||||||
tableSchema({
|
tableSchema({
|
||||||
name: 'users',
|
name: 'users',
|
||||||
|
@ -24,7 +24,8 @@ export default appSchema({
|
||||||
{ name: 'file_upload_media_type_white_list', type: 'string', isOptional: true },
|
{ name: 'file_upload_media_type_white_list', type: 'string', isOptional: true },
|
||||||
{ name: 'file_upload_max_file_size', type: 'number', isOptional: true },
|
{ name: 'file_upload_max_file_size', type: 'number', isOptional: true },
|
||||||
{ name: 'rooms_updated_at', type: 'number', isOptional: true },
|
{ name: 'rooms_updated_at', type: 'number', isOptional: true },
|
||||||
{ name: 'version', type: 'string', isOptional: true }
|
{ name: 'version', type: 'string', isOptional: true },
|
||||||
|
{ name: 'last_local_authenticated_session', type: 'number', isOptional: true }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
|
@ -14,6 +14,10 @@ const localAuthenticate = async(server) => {
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (serverRecord?.lastLocalAuthenticatedSession) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
const authResult = await LocalAuthentication.authenticateAsync();
|
const authResult = await LocalAuthentication.authenticateAsync();
|
||||||
return Promise.resolve(authResult?.success);
|
return Promise.resolve(authResult?.success);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue