NAS: adtype is an integer column (1), not a string — fixes sponsorads insert
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,8 +43,11 @@ function impressionsPerCredit(type) {
|
||||
return type === 'banner' ? 5 : type === 'text' ? 10 : type === 'video' ? 0 : 0;
|
||||
}
|
||||
function nasKind(type) {
|
||||
if (type === 'banner') return { pid: 2, adtype: 'banner' };
|
||||
if (type === 'text') return { pid: 1, adtype: 'text' };
|
||||
// pid encodes text(1)/banner(2); adtype is a separate small int — 1 is the
|
||||
// value the overwhelming majority of live NAS rows use for both formats.
|
||||
const adtype = Number(process.env.NAS_ADTYPE || 1);
|
||||
if (type === 'banner') return { pid: 2, adtype };
|
||||
if (type === 'text') return { pid: 1, adtype };
|
||||
return null; // only banner/text syndicate to NAS in v1 (login/solo/video are IAP-native)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user