refactor(api): /v1/me 收敛 expire_at → 只发 expires_at(无 web 用户中心)
之前后端同时发 expire_at + expires_at(分别给 app + web 用户中心)。现已无 web 端, 双发是纯冗余,统一只用 expires_at: - account.go:meResponse 删 ExpireAt 字段 + GetMe handler 不再赋值 - client me.dart:fromJson 删 (expires_at ?? expire_at) 别名回退 - 两端契约快照同步:Go meResponse 冻结集去 expire_at(12→11 key)、删 Dart 别名测试 - 验证:go test httpapi 绿、flutter test contract(14)绿、analyze EXIT 0、e2e 全链路绿 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -87,14 +87,6 @@ void main() {
|
||||
expect(me.weeklyGb, hasLength(7));
|
||||
expect(me.totpEnabled, isTrue);
|
||||
});
|
||||
|
||||
test('expires_at 接受别名 expire_at(后端历史兼容)', () {
|
||||
final me = Me.fromJson({
|
||||
..._meSample()..remove('expires_at'),
|
||||
'expire_at': '2027-01-01T00:00:00Z',
|
||||
});
|
||||
expect(me.expiresAt, DateTime.tryParse('2027-01-01T00:00:00Z'));
|
||||
});
|
||||
});
|
||||
|
||||
group('/v1/usage 契约快照(UsagePoint)', () {
|
||||
|
||||
Reference in New Issue
Block a user