Tokens
This commit is contained in:
parent
c26225687b
commit
7edca0ef66
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)]))
|
||||
|
|
|
|||
|
|
@ -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) >
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue