This commit is contained in:
Hillel Coren 2020-07-17 16:18:42 +03:00
parent c26225687b
commit 7edca0ef66
4 changed files with 6 additions and 9 deletions

View File

@ -227,6 +227,7 @@ abstract class CompanyEntity extends Object
BuiltList<DesignEntity> get designs;
@BuiltValueField(wireName: 'tokens_hashed')
BuiltList<TokenEntity> get tokens;
BuiltList<WebhookEntity> get webhooks;

View File

@ -184,7 +184,7 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
serializers.serialize(object.designs,
specifiedType:
const FullType(BuiltList, const [const FullType(DesignEntity)])),
'tokens',
'tokens_hashed',
serializers.serialize(object.tokens,
specifiedType:
const FullType(BuiltList, const [const FullType(TokenEntity)])),
@ -500,7 +500,7 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
BuiltList, const [const FullType(DesignEntity)]))
as BuiltList<Object>);
break;
case 'tokens':
case 'tokens_hashed':
result.tokens.replace(serializers.deserialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(TokenEntity)]))

View File

@ -107,7 +107,6 @@ class AuthRepository {
url = formatApiUrl(url) + '/refresh';
if (updatedAt > 0) {
// TODO re-enable this
//url += '?updated_at=$updatedAt';
includeStatic = includeStatic ||
DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) >

View File

@ -12,11 +12,6 @@ List<String> dropdownTokensSelector(BuiltMap<String, TokenEntity> tokenMap,
BuiltList<String> tokenList, String clientId) {
final list = tokenList.where((tokenId) {
final token = tokenMap[tokenId];
/*
if (clientId != null && clientId > 0 && token.clientId != clientId) {
return false;
}
*/
return token.isActive;
}).toList();
@ -40,7 +35,9 @@ List<String> filteredTokensSelector(BuiltMap<String, TokenEntity> tokenMap,
if (tokenListState.filterEntityId != null &&
token.id != tokenListState.filterEntityId) {
return false;
} else {}
} else {
//
}
if (!token.matchesStates(tokenListState.stateFilters)) {
return false;