Tokens
This commit is contained in:
parent
c26225687b
commit
7edca0ef66
|
|
@ -227,6 +227,7 @@ abstract class CompanyEntity extends Object
|
||||||
|
|
||||||
BuiltList<DesignEntity> get designs;
|
BuiltList<DesignEntity> get designs;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: 'tokens_hashed')
|
||||||
BuiltList<TokenEntity> get tokens;
|
BuiltList<TokenEntity> get tokens;
|
||||||
|
|
||||||
BuiltList<WebhookEntity> get webhooks;
|
BuiltList<WebhookEntity> get webhooks;
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
serializers.serialize(object.designs,
|
serializers.serialize(object.designs,
|
||||||
specifiedType:
|
specifiedType:
|
||||||
const FullType(BuiltList, const [const FullType(DesignEntity)])),
|
const FullType(BuiltList, const [const FullType(DesignEntity)])),
|
||||||
'tokens',
|
'tokens_hashed',
|
||||||
serializers.serialize(object.tokens,
|
serializers.serialize(object.tokens,
|
||||||
specifiedType:
|
specifiedType:
|
||||||
const FullType(BuiltList, const [const FullType(TokenEntity)])),
|
const FullType(BuiltList, const [const FullType(TokenEntity)])),
|
||||||
|
|
@ -500,7 +500,7 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
BuiltList, const [const FullType(DesignEntity)]))
|
BuiltList, const [const FullType(DesignEntity)]))
|
||||||
as BuiltList<Object>);
|
as BuiltList<Object>);
|
||||||
break;
|
break;
|
||||||
case 'tokens':
|
case 'tokens_hashed':
|
||||||
result.tokens.replace(serializers.deserialize(value,
|
result.tokens.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(
|
specifiedType: const FullType(
|
||||||
BuiltList, const [const FullType(TokenEntity)]))
|
BuiltList, const [const FullType(TokenEntity)]))
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,6 @@ class AuthRepository {
|
||||||
url = formatApiUrl(url) + '/refresh';
|
url = formatApiUrl(url) + '/refresh';
|
||||||
|
|
||||||
if (updatedAt > 0) {
|
if (updatedAt > 0) {
|
||||||
// TODO re-enable this
|
|
||||||
//url += '?updated_at=$updatedAt';
|
//url += '?updated_at=$updatedAt';
|
||||||
includeStatic = includeStatic ||
|
includeStatic = includeStatic ||
|
||||||
DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) >
|
DateTime.now().millisecondsSinceEpoch - (updatedAt * 1000) >
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,6 @@ List<String> dropdownTokensSelector(BuiltMap<String, TokenEntity> tokenMap,
|
||||||
BuiltList<String> tokenList, String clientId) {
|
BuiltList<String> tokenList, String clientId) {
|
||||||
final list = tokenList.where((tokenId) {
|
final list = tokenList.where((tokenId) {
|
||||||
final token = tokenMap[tokenId];
|
final token = tokenMap[tokenId];
|
||||||
/*
|
|
||||||
if (clientId != null && clientId > 0 && token.clientId != clientId) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return token.isActive;
|
return token.isActive;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
|
|
@ -40,7 +35,9 @@ List<String> filteredTokensSelector(BuiltMap<String, TokenEntity> tokenMap,
|
||||||
if (tokenListState.filterEntityId != null &&
|
if (tokenListState.filterEntityId != null &&
|
||||||
token.id != tokenListState.filterEntityId) {
|
token.id != tokenListState.filterEntityId) {
|
||||||
return false;
|
return false;
|
||||||
} else {}
|
} else {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
if (!token.matchesStates(tokenListState.stateFilters)) {
|
if (!token.matchesStates(tokenListState.stateFilters)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue